Go struct

作者: JaedenKil | 来源:发表于2019-03-05 15:44 被阅读0次
    package main
    
    import "fmt"
    
    func main() {
        v := Vertex{5, 2}
        fmt.Println(v.X)
        fmt.Println(v.Y)
    }
    
    type Vertex struct {
        X int
        Y int
    }
    

    Outputs:

    5
    2
    

    相关文章

      网友评论

        本文标题:Go struct

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