Add new page for Go
This commit is contained in:
parent
b51827675e
commit
2aae4c65fe
|
@ -13,5 +13,6 @@
|
|||
- [PostgreSQL](./postgresql.md)
|
||||
- [Angular](./angular.md)
|
||||
- [.NET](./dotnet.md)
|
||||
- [Go](./golang.md)
|
||||
- [Windows Terminal](./windows-terminal.md)
|
||||
- [Visual Studio Commands](./visual-studio.md)
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
# Go
|
||||
|
||||
```powershell
|
||||
# Initialize a new module.
|
||||
go mod init example.com/hello
|
||||
|
||||
# Run the current directory.
|
||||
go run .
|
||||
|
||||
# Update and cleanup go.mod.
|
||||
go mod tidy
|
||||
|
||||
# Run tests (in files that end with _test.go).
|
||||
go test
|
||||
go test -v
|
||||
|
||||
# Generate a platform-specific application.
|
||||
go build
|
||||
|
||||
# Install the current application to the Go path.
|
||||
go install
|
||||
```
|
||||
|
||||
## Information
|
||||
```powershell
|
||||
# Get Go's version.
|
||||
go version
|
||||
|
||||
# Find where the current module would be installed to.
|
||||
go list -f '{{.Target}}'
|
||||
```
|
||||
|
||||
## Requirements
|
||||
```powershell
|
||||
# Update go.mod to point a module to a local directory.
|
||||
go mod edit -replace example.com/greetings=../greetings
|
||||
```
|
Loading…
Reference in New Issue