package
0.0.0-20210923165938-3c783569b233
Repository: https://github.com/harshvaragiya/learninggo.git
Documentation: pkg.go.dev

# README

Maps

  • Declare a map of type string-> Vertex (Struct)
var m map[string]Vertex
  • Make a map for string -> Vertex
m = make(map[string]Vertex)

Mutating Maps

  • Insert or update an element in map m:
m[key] = elem
  • Retrieve an element:
elem = m[key]
  • Delete an element:
delete(m, key)
  • Test that a key is present with a two-value assignment:
elem, ok = m[key]
  • If key is in m, ok is true. If not, ok is false. If key is not in the map, then elem is the zero value for the map's element type.

# Structs

No description provided by the author