Source file tour/moretypes/struct-fields.go
1 //go:build OMIT 2 3 package main 4 5 import "fmt" 6 7 type Vertex struct { 8 X int 9 Y int 10 } 11 12 func main() { 13 v := Vertex{1, 2} 14 v.X = 4 15 fmt.Println(v.X) 16 } 17
1 //go:build OMIT 2 3 package main 4 5 import "fmt" 6 7 type Vertex struct { 8 X int 9 Y int 10 } 11 12 func main() { 13 v := Vertex{1, 2} 14 v.X = 4 15 fmt.Println(v.X) 16 } 17