MENU

Fun & Interesting

justforfunc #36: Versions, build constraints, and ldflags

justforfunc: Programming in Go 9,292 lượt xem 6 years ago
Video Not Working? Fix It Now

During my Go Tooling in Action Workshop (https://github.com/campoy/go-tooling-workshop)
many people ask how to include version information to binaries,
so I decided to make an episode out of it!

We will solve the problem using three different techniques:

- constants and build constraints
- variables and build constraints
- variables and ldflags

source code: https://github.com/campoy/justforfunc/tree/master/36-versions
form: http://form.justforfunc.com
planning:
https://twitter.com/francesc/status/1011671677594370049

Comment