You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reflect2 is too brittle because of the reliance on the internals of the golang's compiler. Moreover, it is no longer maintained: github.com/modern-go/reflect2..
Replace the usages of github.com/modern-go/reflect2 with stdlib's reflect.
The text was updated successfully, but these errors were encountered:
Also for the record reflect2 wraps reflect.Type under the hood, which means when using it the linker considers the Method and MethodByName functions as reachable (even if this library doesn't use them), which disables some dead code elimination, resulting in a significantly bigger binary... (see this talk for more details)
Having this optimization enabled reduced a binary I work on from around 36MB to 29MB.
reflect2
is too brittle because of the reliance on the internals of the golang's compiler. Moreover, it is no longer maintained: github.com/modern-go/reflect2..Replace the usages of
github.com/modern-go/reflect2
with stdlib'sreflect
.The text was updated successfully, but these errors were encountered: