package main import "fmt" func main() { myGreeting := map[string]string{ "zero": "Good morning!", "one": "Bonjour!", "two": "Buenos dias!", "three": "Bongiorno!", } fmt.Println(myGreeting) delete(myGreeting, "two") fmt.Println(myGreeting) }
GOROOT=C:\Program Files\Go #gosetup
GOPATH=C:\Users\EDZ\go #gosetup
"C:\Program Files\Go\bin\go.exe" build -o C:\Users\EDZ\AppData\Local\Temp\GoLand\___11go_build_main_go__5_.exe C:\Users\EDZ\Desktop\GolangTraining\19_map\08_updating-entry\main.go #gosetup
C:\Users\EDZ\AppData\Local\Temp\GoLand\___11go_build_main_go__5_.exe #gosetup
map[Harleen:Howdy Jenny:Bonjour! Tim:Good morning!]
map[Harleen:Gidday Jenny:Bonjour! Tim:Good morning!]
进程 已完成,退出代码为 0