-
Book Overview & Buying
-
Table Of Contents
Practical Systems Programming in Go
By :
Running Go code is intentionally simple and designed to streamline both experimentation and production workflows. At its core, you use the go run command to compile and execute a Go source file directly, which is especially convenient for testing small programs or experimenting with snippets. For larger projects, you typically organize your code into modules and packages, using go build to produce executable binaries that you need to run in a subsequent step. The Go toolchain handles compilation, linking, and dependency management in a single unified workflow, so you do not need separate build scripts or external tools. In this section, we will walk through the different ways of running Go code.
When we say the Go toolchain, we refer to the complete set of tools that comes with the Go distribution and is responsible for compiling, running, testing, and managing Go code. At the heart of it is the go command, which acts as the frontend interface for the developer. The...