Go语言中文网 为您找到相关结果 4 个
你为什么应该学习Go语言
http://www.cuelogic.com/blog/go-programming-and-why-should-you-learn-go...阅读全文
最后一个不应该是{joe 13}吗?为何是 {joe 19}?为何进行了值的拷贝?是拷贝哪个值?
package main import ( "fmt" ) type person struct { Name string Age int } func main() { a := person{ Name: "joe", Age: 19, } fmt.Println(a) A(a) fmt.Println(a) } func A(per person) { per.Age = 13 fmt.Println("A", per) } 结果: {joe 19} A {joe 13} {joe 19...阅读全文