...
Installation
brew install go
Add it to your Path
Add the following to your .bashrc or zshrc file
Code Block |
---|
export PATH="$PATH:$(go env GOPATH)/bin" |
Configuration
Setup default workspace
...
go build
Install it
go install
Creating a Module
Create a go.mod file
Code Block | ||
---|---|---|
| ||
module mymodule
go 1.18
|
Add Libraries
go get github.com/qopher/go-torrentapi
Commands
Command | Description |
---|---|
go run <src.go> | Run some code |
go build | Compile the code. Outputs to local folder. Executable has folder as name. |
go install | Compiles and places the output in workspace/bin |
go env GOPATH | Outputs the default workspace folder |
...