Optimize Go binary size

Well, I found yesterday that LogPacker Daemon weights about 21MB. This application is written in Go language, it’s really doing a lot of things, has built-in connectors to different Data-Storages, has Cluster solution inside, etc.

Quiz yourself in Golang. Part 1

30 basic questions to measure your Golang knowledge. Answers and .go files you can find on GitHub page.

Don’t hesitate to create a Pull Request in case of some found errors, typos.

Measure performance changes with benchcmp

Go has a great option to write your benchmarks and run it together with go test with option -bench. To create a benchmark function you must do the following:

Supported Go types for gomobile bind

LogPacker

gomobile bind

With gomobile we can generate language bindings that make it possible to call Go functions from Java. And it’s awesome. Now you can write Android applications in Go (unfortunately without UI features and with pure SDK coverage, but I hope it will grow up from experiment to production-ready tool).