Skip to main content

Tool for managing go source code.

# To download and install a package, specified by its import path:
go get <package_path>

# To compile and run a source file (it has to contain a main package):
go run <file.go>

# To compile a source file into a named executable:
go build -o <executable file.go>

# To compile the package present in the current directory:
go build

# To execute all test cases of the current package (files have to end with '_test.go'):
go test

# To compile and install the current package:
go install