Gehen Sie zur Karte hinzufügen
m := make(map[string]int)
m["numberOne"] = 1
m["numberTwo"] = 2
Navid2zp
m := make(map[string]int)
m["numberOne"] = 1
m["numberTwo"] = 2
type Vertex struct {
Lat, Long float64
}
var m map[string]Vertex
func main() {
m = make(map[string]Vertex)
m["Bell Labs"] = Vertex{
40.68433, -74.39967,
}
fmt.Println(m["Bell Labs"])
}
subjectMarks := map[string]float32{"Golang": 85, "Java": 80, "Python": 81}