Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 853 Bytes

File metadata and controls

21 lines (16 loc) · 853 Bytes

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.