go语言中定义一个struct后,如何把一个变量的值传入

useradmin · · 1562 次点击
``` go var personSend Personalinformation_send tmpTotal := 2*2 personSend.total = tmpTotal fmt.Println(personSend) ``` 注意 go 的对外暴露,注意定义结构体的时候,total 首字母是否大些
#4
更多评论
``` var ps Personalinformation_send ps.total += 1 ```
#1
没看懂你想怎么传入?解释得更详细些
#2