2 ms·
This is great — I dragged a binary to the demo URL and it made me realize I had forgotten to pass `-ldflags="-s -w"` to strip the DWARF and symbol tables when I
by peterldowns 2y ago
This is great — I dragged a binary to the demo URL and it made me realize I had forgotten to pass `-ldflags="-s -w"` to strip the DWARF and symbol tables when I was building the binary. This will take my binaries from 25 MB down to 18 MB, a ~30% reduction in space. The container I'm building drops from 45 MB down to 36 MB, a 20% reduction. Every little bit helps when it comes to deploy times and space/speed savings!
(for the container image size analysis I used dive, available here https://github.com/wagoodman/dive https://github.com/wagoodman/dive)