Golang structs
16 August 2024 (Updated 16 August 2024)
A struct is a collection of fields:
package main
import "fmt"
type Vertex struct {
X int
Y int
}
func main() {
fmt.Println(Vertex{1, 2})
}
Tagged:
Golang