diff --git a/.gitignore b/.gitignore index 2eea525..360b70b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.env \ No newline at end of file +.env +data.json \ No newline at end of file diff --git a/data.json.example b/data.json.example new file mode 100644 index 0000000..4772f09 --- /dev/null +++ b/data.json.example @@ -0,0 +1,3 @@ +{ + "tags": {} +} diff --git a/manage_data.go b/manage_data.go index a408836..148da71 100644 --- a/manage_data.go +++ b/manage_data.go @@ -6,6 +6,8 @@ import ( "os" ) +//DATA WILL ONLY BE USED AS JSON FILE FOR TESTING. SYSTEM WILL BE REPLACED + type Tags struct { Tags map[string]string `json:"tags"` } @@ -54,7 +56,7 @@ func modifyTag(tags *Tags, tagKey string, newTagValue string) { } func debugTags() { - tags, err := readTags("tags.json") + tags, err := readTags("data.json") if err != nil { log.Fatalf("Failed to read tags: %v", err) } @@ -63,7 +65,7 @@ func debugTags() { removeTag(tags, "test_command") modifyTag(tags, "another_test_command", "updated command description") - err = writeTags("tags.json", tags) + err = writeTags("data.json", tags) if err != nil { log.Fatalf("Failed to write tags: %v", err) } diff --git a/tags.json b/tags.json deleted file mode 100644 index c890961..0000000 --- a/tags.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "tags": { - "another_another_test_command": "updated command description", - "another_test_command": "updated command description", - "new_command": "a new command description", - "new_tag": "A newly added tag." - } -} \ No newline at end of file