From 4cac843cae95c7a2aa382595fa4f0837724468bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BC=9A=E6=9C=89=E7=8C=AB=E7=9A=84?= Date: Fri, 15 May 2020 00:01:50 +0800 Subject: [PATCH] go-*: apply additional suggestions Co-authored-by: Starbeamrainbowlabs --- pages/common/go-build.md | 10 +++++----- pages/common/go-clean.md | 8 ++++---- pages/common/go-doc.md | 4 ++-- pages/common/go-env.md | 6 +++--- pages/common/go-generate.md | 2 +- pages/common/go-mod.md | 2 +- pages/common/go-version.md | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/pages/common/go-build.md b/pages/common/go-build.md index 01cea6c8e..c0e8c6d78 100644 --- a/pages/common/go-build.md +++ b/pages/common/go-build.md @@ -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}}` diff --git a/pages/common/go-clean.md b/pages/common/go-clean.md index c704ee850..803c82115 100644 --- a/pages/common/go-clean.md +++ b/pages/common/go-clean.md @@ -3,18 +3,18 @@ > Remove object files and cached files. > More information: . -- 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` diff --git a/pages/common/go-doc.md b/pages/common/go-doc.md index f4a031611..d21a84587 100644 --- a/pages/common/go-doc.md +++ b/pages/common/go-doc.md @@ -1,9 +1,9 @@ # go doc -> Show documentation for package or symbol. +> Show documentation for a package or symbol. > More information: . -- Show documentation for current package: +- Show documentation for the current package: `go doc` diff --git a/pages/common/go-env.md b/pages/common/go-env.md index e66a7d0b2..2820bdd4e 100644 --- a/pages/common/go-env.md +++ b/pages/common/go-env.md @@ -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}}` diff --git a/pages/common/go-generate.md b/pages/common/go-generate.md index 2a4955ac5..8a1f3b746 100644 --- a/pages/common/go-generate.md +++ b/pages/common/go-generate.md @@ -1,6 +1,6 @@ # go generate -> Generate Go files by processing source. +> Generate Go files by running commands within source files. > More information: . - Generate Go files by running commands within source files: diff --git a/pages/common/go-mod.md b/pages/common/go-mod.md index c02d2925c..0d1804864 100644 --- a/pages/common/go-mod.md +++ b/pages/common/go-mod.md @@ -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` diff --git a/pages/common/go-version.md b/pages/common/go-version.md index 4cf27e7bb..1ed64f493 100644 --- a/pages/common/go-version.md +++ b/pages/common/go-version.md @@ -9,4 +9,4 @@ - Print the Go version used to build the named executable file: -`go version {{executable}}` +`go version {{path/to/executable}}`