【发布时间】:2022-01-05 21:33:42
【问题描述】:
我是 Golang 的新手,我正在尝试从结构中获取一些属性 例如:
type Client struct{
name string//1
lastName string//2
age uint//3
}
func main(){
client := Client{name:"Facundo",lastName:"Veronelli",age:23}
fmt.println(client.getLengthAttibutes())//It would print "3"
}
【问题讨论】: