Phillezi / kthcloud-cli

A CLI tool for kthcloud, designed for managing grouped deployments similar to Docker Compose.
MIT License
1 stars 0 forks source link

Reduce binary size #26

Open Phillezi opened 1 month ago

Phillezi commented 1 month ago

The binary is really big (14mb), end users dont need debug symbols so we can omit these symbols.

https://github.com/xaionaro/documentation/blob/master/golang%2Freduce-binary-size.md

Adding ldflags -w -s. Seem to make a huge difference in the binary size. One example I saw was a 12mb bin that shrunk to 1 / 7 of the size by just omitting debug flags.

Phillezi commented 1 month ago

better to do this when it is more stable, omitting debug flags might be a bad idea during (early) development