Skip to content

Latest commit

 

History

History

36-versions

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

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.