Skip to content

Files

Latest commit

7aa48ab · Jun 28, 2018

History

History

36-versions

Versions, build constraints, and ldflags

During my Go Tooling in Action 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 (code)
  • variables and build constraints (code)
  • variables and ldflags (code)

In each directory you can build the development and production releases by running make dev or make prod.