https://github.com/wintermi/zsh-golang
A simple zsh plugin for the Go programming language toolchain.
https://github.com/wintermi/zsh-golang
golang zsh zsh-plugin
Last synced: 14 days ago
JSON representation
A simple zsh plugin for the Go programming language toolchain.
- Host: GitHub
- URL: https://github.com/wintermi/zsh-golang
- Owner: wintermi
- License: apache-2.0
- Created: 2023-01-01T09:32:51.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-28T09:49:02.000Z (9 months ago)
- Last Synced: 2025-04-27T00:26:17.895Z (2 months ago)
- Topics: golang, zsh, zsh-plugin
- Language: Shell
- Homepage:
- Size: 111 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zsh-golang
A zsh plugin for the Go programming language toolchain.## Install
Using the [:zap: Zap](https://www.zapzsh.org/) minimal zsh plugin manager, add the following to your `.zshrc````sh
# 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:- [`g`](https://github.com/stefanmaric/g) - A simple go version manager
- [`go`](https://github.com/golang/go) - The Go programming language
- [`gofmt`](https://pkg.go.dev/cmd/gofmt) - Formats Go programs## Environment
By default, the following go environment variables will be setup```sh
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
```sh
# 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](https://github.com/wintermi/zsh-golang/blob/main/LICENSE) unless explicitly mentioned in the file header.