mirror of
https://github.com/traefik/yaegi.git
synced 2026-06-01 18:37:56 +00:00
22 lines
185 B
Go
22 lines
185 B
Go
package main
|
|
|
|
type T struct {
|
|
name string
|
|
size int
|
|
}
|
|
|
|
var table = map[int]*T{
|
|
0: {
|
|
name: "foo",
|
|
size: 2,
|
|
}}
|
|
|
|
var s = table[0].size
|
|
|
|
func main() {
|
|
println(s)
|
|
}
|
|
|
|
// Output:
|
|
// 2
|