摘要:dept1 := Dept{ name: "MySohu", building: "Internet", floor: 7} switch v := interface{}(dept1).(type) { case DeptModeFull: fmt.Printf("The dept1 is a D
阅读全文
07 2016 档案
摘要:dept1 := Dept{ name: "MySohu", building: "Internet", floor: 7} switch v := interface{}(dept1).(type) { case DeptModeFull: fmt.Printf("The dept1 is a D
阅读全文
摘要:值类型的变量和指针类型的变量 先声明一个结构体:type T struct { Name string } func (t T) M1() { t.Name = "name1" } func (t *T) M2() { t.Name = "name2" }1234567891011123456789
阅读全文
|