生命不止,继续Go go go.
今天跟大家分享一些golang中的struct。
定义
package main
import "fmt"
type Vertex struct {
X int
Y int
}
func main() {
fmt.Println(Vertex{1, 2})
}
type Circle struct {
x, y, r float64
}
生命不止,继续Go go go.
今天跟大家分享一些golang中的struct。
定义
package main
import "fmt"
type Vertex struct {
X int
Y int
}
func main() {
fmt.Println(Vertex{1, 2})
}
type Circle struct {
x, y, r float64
}