March 2020
Intermediate to advanced
406 pages
8h 39m
English
The invocation stanza for go build is as follows:
go build [-o output] [build flags] [packages]
Defining an output with -o compiles a binary using a specifically named file. This is helpful when you have a particular naming convention that you want to keep for your file, or if you want to name binaries based on different build parameters (platform/OS/git SHA and others).
Packages can be defined as a list of go source files or they can be omitted. If a list of go source files is specified, the build program will use the list of files that were passed as a group that specifies a single package. If no packages are defined, the build program will validate that the packages within the directory can be built, but ...
Read now
Unlock full access