Go map

作者: JaedenKil | 来源:发表于2019-03-08 15:34 被阅读0次
package main

import "fmt"

func main() {
    var m map[string]Collection02
    m = make(map[string]Collection02)
    m["Hello World"] = Collection02{
        3.1415926, -2.141414,
    }
    fmt.Println(m["Hello World"])
}

type Collection02 struct {
    X float64
    Y float64
}
{3.1415926 -2.141414}

The syntax seems confusingly weird...

相关文章

网友评论

      本文标题:Go map

      本文链接:https://www.haomeiwen.com/subject/unbrpqtx.html