You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
golang-tutorial/demo/point/map01.go

15 lines
279 B

package main
import (
"fmt"
)
func main(){
// map[KeyType]ValueType 集合类型
var personSalary map[string]int
// go的三个引用类型 map slice chan
if personSalary == nil {
fmt.Println("map is nil. Going to make one.")
personSalary = make(map[string]int)
}
}