Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save pablocattaneo/1d2a873c27ffa51b78702d04d2cc5f85 to your computer and use it in GitHub Desktop.

Select an option

Save pablocattaneo/1d2a873c27ffa51b78702d04d2cc5f85 to your computer and use it in GitHub Desktop.
myMap := make(map[string]int)
myMap["key1"] = 15
myMap["key2"] = 100
myMap["key3"] = 7
myMap["key4"] = 23
// clear syntax: clear(mapVariable)
clear(myMap)
fmt.Println("Map after clearing:", myMap)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment