不是。在 1.7 版本引入了 method pruning,没有引用和反射的方法将不会被打包。
参见
https://blog.golang.org/go1.7-binary-sizeThe second change is method pruning. Until 1.6, all methods on all used types were kept, even if some of the methods were never called. This is because they might be called through an interface, or called dynamically using the reflect package. Now the compiler discards any unexported methods that do not match an interface. Similarly the linker can discard other exported methods, those that are only accessible through reflection, if the corresponding reflection features are not used anywhere in the program. That change shrinks binaries by 5–20%.