在effectiveGo的文档中它指出:AswesawwithByteSize,methodscanbedefinedforanynamedtype(exceptapointer...typeByteSlice[]bytefunc(sliceByteSlice)Append(data[]byte)[]byte{//Bodyexactlythesameasabove}然后继续提供一个指针作为接收者的例子:func(p*ByteSlice)Append(data[]byte){slice:=*p//Bodyasabove,withoutthereturn.*p=slice}这不矛盾吗?或者
在effectiveGo的文档中它指出:AswesawwithByteSize,methodscanbedefinedforanynamedtype(exceptapointer...typeByteSlice[]bytefunc(sliceByteSlice)Append(data[]byte)[]byte{//Bodyexactlythesameasabove}然后继续提供一个指针作为接收者的例子:func(p*ByteSlice)Append(data[]byte){slice:=*p//Bodyasabove,withoutthereturn.*p=slice}这不矛盾吗?或者