Closed dolmen closed 1 year ago
In declaration of types used for reflect, use reflect.TypeOf((*T)).Elem() instead of reflect.TypeOf(T{}) to avoid init-time allocations.
reflect
reflect.TypeOf((*T)).Elem()
reflect.TypeOf(T{})
See related stdlib issue: https://github.com/golang/go/issues/55973
Blocked on my side by dolmen/github-keygen#47 as I have to sign my commits.
No worries for signed commits. Merged it, thanks a lot for the patch!
In declaration of types used for
reflect
, usereflect.TypeOf((*T)).Elem()
instead ofreflect.TypeOf(T{})
to avoid init-time allocations.See related stdlib issue: https://github.com/golang/go/issues/55973