Creates a new map
var m = make(map[string]int)
m[“https://3.info:”] = 3
Add this map to the slice
siteList.Sites = append(siteList.Sites, m)
To remove an item, just procede as you do when removing an element from a slice
func RemoveIndex(s []map[string]int, index int) []int {
return append(s[:index], s[index+1:]...)
}
4) To update your file just writes the new json structure to it
file, _ := json.Marshal(siteList)
_ = ioutil.WriteFile("data.json", file, 0644)