结构 / 继承

import (
    "fmt"
)

type shape struct {
    lineCount int
}

type square struct {
    sideLength int
    shape
}

square2 := square{2shape{4}}
//square.lineCount is 4

fmt.Println(square2.lineCount)