Back to Ohmyzsh

Golang plugin

plugins/golang/README.md

latest2.9 KB
Original Source

Golang plugin

This plugin adds completion for the Go Programming Language, as well as some aliases for common Golang commands.

To use it, add golang to the plugins array in your zshrc file:

zsh
plugins=(... golang)

Aliases

AliasCommandDescription
gobgo buildBuild your code
gocgo cleanRemoves object files from package source directories
godgo docPrints documentation comments
goego envPrints Go environment information
gofgo fmtGofmt formats (aligns and indents) Go programs.
gofago fmt ./...Run go fmt for all packages in current directory, recursively
gofxgo fixUpdate packages to use a new API
goggo getDownloads packages and then installs them to $GOPATH
gogago get ./...Installs all dependencies in current directory, recursively
goigo installCompiles and installs packages to $GOPATH
golgo listLists Go packages
gomgo modAccess to operations on modules
gomtgo mod tidyTidies up the go.mod file
gopacd $GOPATHTakes you to $GOPATH
gopbcd $GOPATH/binTakes you to $GOPATH/bin
gopscd $GOPATH/srcTakes you to $GOPATH/src
gorgo runCompiles and runs your code
gotgo testRuns tests
gotago test ./...Runs tests in all subdirectories
gotogo toolPrints all the available tools
gotocgo tool compileGenerates object file
gotodgo tool distUtility to bootstrap, build and test go runtime
gotofxgo tool fixFixes an application to use newer features
govgo vetVet examines Go source code and reports suspicious constructs
govego versionPrints Go version
gowgo workWork provides access to operations on workspaces