mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-03-28 21:16:20 +01:00
go: add page (#1085)
This commit is contained in:
parent
6848f6db44
commit
b0cc68425b
1 changed files with 23 additions and 0 deletions
23
pages/common/go.md
Normal file
23
pages/common/go.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
# go
|
||||
|
||||
> Tool for managing go source code.
|
||||
|
||||
- Download and install a package, specified by its import path:
|
||||
|
||||
`go get {{package_path}}`
|
||||
|
||||
- Compile and run a source file (it has to contain a `main` package):
|
||||
|
||||
`go run {{file}}.go`
|
||||
|
||||
- Compile the package present in the current directory:
|
||||
|
||||
`go build`
|
||||
|
||||
- Execute all test cases of the current package (files have to end with `_test.go`):
|
||||
|
||||
`go test`
|
||||
|
||||
- Compile and install the current package:
|
||||
|
||||
`go install`
|
Loading…
Add table
Reference in a new issue