Go Struct Pointers
package main//from w w w .ja v a2 s. c om import "fmt" type MyStruct struct { X, Y string } var a = MyStruct{"A","C"} var b = &MyStruct{"J","K"} var c = MyStruct{X:"S",Y:"X"} var d = MyStruct{} func main() { e := b b.X = "R" f := *b fmt.Println("a:\t",a) fmt.Println("b:\t",b) fmt.Println("c:\t",c) fmt.Println("d:\t",d) fmt.Println("e:\t",e) fmt.Println("e:\t",f) }