Can I run strip on go binaries?

What will happen if I strip go binaries for production use?
If I use -ldflags="-s -w" instead, can I use object --keep-only-debug to keep debug info?
What should I do?

Looks like stripping binaries gets you a 25%+ space reduction, but there’s a project called “UPX” that compresses and reduces go binaries down to ~15% of their size: https://upx.github.io/

And now I found your other post where you said you don’t want to use UPX. In that case, you can save ~25% by stripping the binaries.

thank you

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.