Closed aarzilli closed 1 year ago
Using MethodByName disables deadcode elimination in the linker (see the deadcode function in $GOROOT/src/cmd/link/internal/ld/deadcode.go).
Since the only use of MethodByName is with a static string as an argument it can be easily replaced with a downcast to an interface.
Using MethodByName disables deadcode elimination in the linker (see the deadcode function in $GOROOT/src/cmd/link/internal/ld/deadcode.go).
Since the only use of MethodByName is with a static string as an argument it can be easily replaced with a downcast to an interface.