mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-29 23:24:55 +02:00
go-build: add clarity (#7438)
This commit is contained in:
parent
ef8fb57839
commit
c13a79e2d9
1 changed files with 2 additions and 2 deletions
|
@ -3,7 +3,7 @@
|
||||||
> Compile Go sources.
|
> Compile Go sources.
|
||||||
> More information: <https://golang.org/cmd/go/#hdr-Compile_packages_and_dependencies>.
|
> More information: <https://golang.org/cmd/go/#hdr-Compile_packages_and_dependencies>.
|
||||||
|
|
||||||
- Compile a file:
|
- Compile a 'package main' file (output will be the filename without extension):
|
||||||
|
|
||||||
`go build {{path/to/main.go}}`
|
`go build {{path/to/main.go}}`
|
||||||
|
|
||||||
|
@ -15,6 +15,6 @@
|
||||||
|
|
||||||
`go build -o {{path/to/binary}} {{path/to/package}}`
|
`go build -o {{path/to/binary}} {{path/to/package}}`
|
||||||
|
|
||||||
- Compile a main package into an executable, with data race detection:
|
- Compile a main package into an executable, enabling data race detection:
|
||||||
|
|
||||||
`go build -race -o {{path/to/executable}} {{path/to/main/package}}`
|
`go build -race -o {{path/to/executable}} {{path/to/main/package}}`
|
||||||
|
|
Loading…
Add table
Reference in a new issue