go-tour/struct-fields.go
2020-02-04 21:44:36 -06:00

15 lines
143 B
Go

package main
import "fmt"
type Vertex struct {
X int
Y int
}
func main() {
v := Vertex{1, 2}
v.X = 4
fmt.Println(v.X)
}