我正在尝试将值设置为结构中的nil指针。//https://play.golang.org/p/jPTMNC_ZQ9packagemainimport("fmt""reflect")typeTstruct{A*int}funcmain(){fmt.Println("Hello,playground")t:=&T{}v:=1vptr:=&vCopyValue(vptr,t.A)//Iwanttosett.Atocontain1}funcCopyValue(srcinterface{},destinterface{}){srcRef:=reflect.ValueOf(src)ifsrcRe
我正在尝试将值设置为结构中的nil指针。//https://play.golang.org/p/jPTMNC_ZQ9packagemainimport("fmt""reflect")typeTstruct{A*int}funcmain(){fmt.Println("Hello,playground")t:=&T{}v:=1vptr:=&vCopyValue(vptr,t.A)//Iwanttosett.Atocontain1}funcCopyValue(srcinterface{},destinterface{}){srcRef:=reflect.ValueOf(src)ifsrcRe