Untitled

mail@pastecode.io avatar
unknown
golang
2 years ago
229 B
1
Indexable
Never
type Vehicle struct {
	Seats int
	Color string
}

type Car struct {
	Vehicle
}


func main() {
	car := &Car{
		Vehicle{
			Seats: 4,
			Color: "blue",
		},
	}

	fmt.Println(car.Seats)
	fmt.Println(car.Color)
}