I wanted Go to put an array in value in the map, so my memo
package main
import "fmt"
type Hoge struct {
Say string
}
func main() {
a := map[string][]Hoge{}
a["hoge"] = append(a["hoge"], Hoge{Say: "hello1"})
a["hoge"] = append(a["hoge"], Hoge{Say: "hello2"})
a["hoge1"] = append(a["hoge1"], Hoge{Say: "hello3"})
fmt.Println(a)
}
If you go run above
map[hoge:[{hello1} {hello2}] hoge1:[{hello3}]]
Array is put in the value of map like