Skip to content

Instantly share code, notes, and snippets.

@luandevpro
Created August 1, 2020 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luandevpro/17a1c0c79409498c9495024f2f94f35d to your computer and use it in GitHub Desktop.
Save luandevpro/17a1c0c79409498c9495024f2f94f35d to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
)
func main() {
student := make(map[string]int)
student["tran"] = 25
student["anonymous"] = 16
value , ok := student["name"]
if ok == true {
fmt.Println("value is " , value)
} else {
fmt.Println("value no found")
}
fmt.Println(student["tran"])
fmt.Println(student["anonymous"])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment