Structures (records)

import (
    "fmt"
)

type car struct {
    wheelCount int
}

func (c carnumberOfWheels() int {
    return c.wheelCount
}

type kamaz struct {
    car
}

kamaz10 := kamaz{car{10}}
wheelCount := kamaz10.numberOfWheels()
//wheelCount is 10

fmt.Println(wheelCount)

fmt.Println("kamaz10 =", kamaz10)