mirror of https://github.com/CrimsonTome/tldr.git
13 lines
321 B
Markdown
13 lines
321 B
Markdown
|
# 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}}`
|