Re:Vulnerability Management for Go
by jrockway on Tuesday September 06, 2022 @04:33PM
(#32742836)
It's important to read the caveats: https://github.com/golang/go/blob/master/src/cmd/link/intern..., the most important of which is:
Basically, if you do certain kinds of reflection, then more code is theoretically reachable and will be included in your binary. In practice, you end up with a large binary in anything that calls into autogenerated APIs.
[ Parent
| on HN ]
That is a useful clarification. It seems to explain why the use of the fmt Go's std lib formatting and printing package, seems to pull in so much. Surely, it is performing a fair amount of reflection under the hood.
The fmt package should not put the compiler into conservative mode. If it does, file a bug report.