复制对象

结构体

//Golang 中没有类
type shape struct {
    LineCount int
    Name      string
}

var square = shape{4, "Square"}
squareCopy := square

fmt.Println("squareCopy =", squareCopy)