Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "fmt"
- )
- type Hoge struct {
- Id int
- }
- func main() {
- l := make([]map[int]Hoge, 1)
- l[0] = map[int]Hoge{
- 1: Hoge{Id: 200},
- }
- fmt.Println(l)
- l2 := map[int64]Hoge{}
- l2[0] = Hoge{Id: 100}
- l2[1] = Hoge{Id: 100}
- fmt.Println(l2)
- }
Add Comment
Please, Sign In to add comment