Introduction
In Go, a build tag, or a build constraint, is an identifier added to a piece of code that determines when the file should be included in a package during the build
process. This allows you to build different versions of your Go application from the same source code and to toggle between them in a fast and organized manner. Many developers use build tags to improve the workflow of building cross-platform compatible applications, such as programs that require code changes to account for variances between different operating systems. Build tags are also used for integration testing, allowing you to quickly switch between the integrated code and the code with a mock service or stub, and for differing levels of feature sets within an application. Continue reading “Customizing Go Binaries with Build Tags”