A zsh plugin for the Go programming language toolchain.
Using the ⚡ Zap minimal zsh plugin manager, add the following to your .zshrc
# Install plugin
plug "wintermi/zsh-golang"
A number of checks are performed to verify the following Go programming language tools have been installed:
By default, the following go environment variables will be setup
export GOPATH="$HOME/go"
export GOROOT="$HOME/.go"
$GOPATH/bin
is also added to the PATH
.
If a different environment location is required, these variables can be defined prior to installing the plugin, as shown below
# Install plugin with a different environment location
export GOROOT="$HOME/.local/share/golang"
export GOPATH="$HOME/MyProjects/go-projects"
plug "wintermi/zsh-golang"
Tab completions are provided for g
, go
and gofmt
commands. An example of which can be seen below.
The zsh-golang plugin is released under the Apache License 2.0 unless explicitly mentioned in the file header.