mirror of
https://github.com/tldr-pages/tldr.git
synced 2026-08-28 11:25:16 +08:00
go*: add a note (#22744)
* chore: Notes for go pages * Update pages/common/go-fmt.md Co-authored-by: Ivan Baluta <ivanbaluta.dev@gmail.com> * Update pages/common/go-list.md Co-authored-by: Ivan Baluta <ivanbaluta.dev@gmail.com> * Update pages/common/go-test.md Co-authored-by: Ivan Baluta <ivanbaluta.dev@gmail.com> --------- Co-authored-by: Ivan Baluta <ivanbaluta.dev@gmail.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# go fmt
|
||||
|
||||
> Format Go source files, printing the changed filenames.
|
||||
> Note: `./...` is a Go package pattern understood by Go tooling. It matches the current package and all packages recursively under the current directory.
|
||||
> More information: <https://pkg.go.dev/cmd/go#hdr-Gofmt__reformat__package_sources>.
|
||||
|
||||
- Format Go source files in the current directory:
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# go list
|
||||
|
||||
> List packages or modules.
|
||||
> Note: `./...` is a Go package pattern understood by Go tooling. It matches the current package and all packages recursively under the current directory.
|
||||
> More information: <https://pkg.go.dev/cmd/go#hdr-List_packages_or_modules>.
|
||||
|
||||
- List packages:
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# go test
|
||||
|
||||
> Test Go packages (files have to end with `_test.go`).
|
||||
> Note: `./...` is a Go package pattern understood by Go tooling. It matches the current package and all packages recursively under the current directory.
|
||||
> More information: <https://pkg.go.dev/cmd/go#hdr-Testing_flags>.
|
||||
|
||||
- Test the package found in the current directory:
|
||||
@@ -11,7 +12,7 @@
|
||||
|
||||
`go test -v`
|
||||
|
||||
- Test the packages in the current directory and all subdirectories (note the `...`):
|
||||
- Test the packages in the current directory and all subdirectories:
|
||||
|
||||
`go test -v ./...`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user