Thanks. That continues to trip me up.

On Fri, 2019-11-22 at 17:01 -0800, Ian Lance Taylor wrote:
> On Fri, Nov 22, 2019 at 1:06 PM Dan Kortschak <d...@kortschak.io>
> wrote:
> > 
> > Are reflect.Type.PkgPath/Name supposed to return strings for
> > defined
> > types? There's nothing in the documentation that says they don't.
> > 
> > But https://play.golang.org/p/8Jede-mimtA and
> > https://play.golang.org/p/LT5m6yz0P5Y don't show any output where I
> > would expect them to.
> 
> You have to be careful when using reflect with interface types.  And
> a
> pointer to a defined type doesn't have a name.  Consider
> 
> https://play.golang.org/p/oXF6Ems5q_q
> 
> https://play.golang.org/p/dKHBkYyfVF6
> 
> Ian
> 

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/adb91033378ee1fca78969a5efcf242506c7fb13.camel%40kortschak.io.

Reply via email to