go-*: apply additional suggestions

Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
client-spec/clarity
会有猫的 2020-05-15 00:01:50 +08:00 committed by Starbeamrainbowlabs
parent 8421b10d30
commit 4cac843cae
No known key found for this signature in database
GPG Key ID: 1BE5172E637709C2
7 changed files with 17 additions and 17 deletions

View File

@ -5,16 +5,16 @@
- Compile a file:
`go build path/to/main.go`
`go build {{path/to/main.go}}`
- Compile into named output:
- Compile, specifying the output filename:
`go build -o {{binary}} path/to/source.go`
`go build -o {{path/to/binary}} {{path/to/source.go}}`
- Compile a package:
`go build -o {{binary}} path/to/package`
`go build -o {{path/to/binary}} {{path/to/package}}`
- Compile a main package into an executable, with data race detection:
`go build -race -o {{executable}} path/to/main/package`
`go build -race -o {{path/to/executable}} {{path/to/main/package}}`

View File

@ -3,18 +3,18 @@
> Remove object files and cached files.
> More information: <https://golang.org/cmd/go/#hdr-Remove_object_files_and_cached_files>.
- Print the remove commands only:
- Print the remove commands instead of actually removing anything:
`go clean -n`
- Remove build cache:
- Delete the build cache:
`go clean -cache`
- Remove cached test results:
- Delete all cached test results:
`go clean -testcache`
- Remove module cache:
- Delete the module cache:
`go clean -modcache`

View File

@ -1,9 +1,9 @@
# go doc
> Show documentation for package or symbol.
> Show documentation for a package or symbol.
> More information: <https://golang.org/cmd/go/#hdr-Show_documentation_for_package_or_symbol>.
- Show documentation for current package:
- Show documentation for the current package:
`go doc`

View File

@ -7,14 +7,14 @@
`go env`
- Show an environment variable:
- Show a specific environment variable:
`go env {{GOPATH}}`
- Set an environment value:
- Set an environment variable to a value:
`go env -w {{GOBIN}}={{path/to/directory}}`
- Reset an environment value:
- Reset an environment variable's value:
`go env -u {{GOBIN}}`

View File

@ -1,6 +1,6 @@
# go generate
> Generate Go files by processing source.
> Generate Go files by running commands within source files.
> More information: <https://golang.org/cmd/go/#hdr-Generate_Go_files_by_processing_source>.
- Generate Go files by running commands within source files:

View File

@ -19,6 +19,6 @@
`go mod verify`
- Copy all dependencies sources into vendor directory:
- Copy sources of all dependencies into the vendor directory:
`go mod vendor`

View File

@ -9,4 +9,4 @@
- Print the Go version used to build the named executable file:
`go version {{executable}}`
`go version {{path/to/executable}}`