zsh-golang
January 21, 2023 ยท View on GitHub
A zsh plugin for the Go programming language toolchain.
Install
Using the :zap: Zap minimal zsh plugin manager, add the following to your .zshrc
# Install plugin
plug "wintermi/zsh-golang"
Prerequisite Checks
A number of checks are performed to verify the following Go programming language tools have been installed:
Environment
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
Tab completions are provided for g, go and gofmt commands. An example of which can be seen below.

License
The zsh-golang plugin is released under the Apache License 2.0 unless explicitly mentioned in the file header.