tldr/pages/common/go-build.md

13 lines
321 B
Markdown
Raw Normal View History

# go build
> Tool for compiling packages and dependencies.
> More information: <https://golang.org/cmd/go/>.
- Compile a source file into a named executable:
`go build -o {{executable}} {{path/to/main/file}}.go`
- Compile a main package into a named executable:
`go build -o {{executable}} {{path/to/main/package}}`