Or maybe I'm just doing something wrong. I have a struct implementing generics where methods return the next method to execute.
For tests, I wanted to make sure the returned method was the one expected, so I was using this: nextStageName := runtime.FuncForPC(reflect.ValueOf(nextStage).Pointer()).Name() (where "nextStage" is the next method) Here is a simple non-generic version where I get what I expect: https://go.dev/play/p/kimGRS7xiP2 result: main.(*AStruct).NextStage-fm): Here is probably a slightly convoluted generic version that does not: https://go.dev/play/p/TUHUaZywki0 result: main.(*GenericStruct[...]).Stage.func1 In that version, it seem to give me the name of the method that returned the next method. Any idea what is (or what I'm doing) wrong? Cheers. -- 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/105a412e-c7df-424f-931c-d25443aa7c80n%40googlegroups.com.