Use the Type: reflect.Value.Type.String: https://play.golang.org/p/dlwjCROG6H
On Saturday, September 17, 2016 at 3:53:35 AM UTC-7, mhhcbon wrote: > > Hi, > > i m wondering if one can use reflect to extract at runtime the body and > and signature of a Func or 'Public method' ? > Will a reflect.Value.String of a Method give me that data ? > > https://golang.org/pkg/reflect/#Method > > Will that work on a compiled binary ? (An environment where the raw source > code does not exists) > > Alternatively, can runtime give me a location information to use with a > sort of go code parser to extract that data ? > Assuming in this case i have the raw source code. > > thanks > -- 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. For more options, visit https://groups.google.com/d/optout.