packagemainimport"fmt"typecarstruct{namestringcolorstring}func(c*car)SetName01(sstring){fmt.Printf("SetName01: car address: %p\n",c)c.name=s}func(ccar)SetName02(sstring){fmt.Printf("SetName02: car address: %p\n",&c)c.name=s}funcmain(){toyota:=&car{name:"toyota",color:"white",}fmt.Printf("car address: %p\n",toyota)fmt.Println(toyota.name)toyota.SetName01("foo")fmt.Println(toyota.name)toyota.SetName02("bar")fmt.Println(toyota.name)toyota.SetName02("test")fmt.Println(toyota.name)}