8961a3794cc2f5bc31b592367e82aa1766f24bbd

Author
Joseph Richey <joerichey@google.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

plugins/go: Simplify/fix recursive golang format (#7027)

Per the [`go` command specification](https://golang.org/cmd/go/#hdr-Package_lists),
the `...` wildcard matches the empty string. This makes commands like
`go <action> . ./...` unnecessary: they should use `go <action> ./...`.

This also fixes a bug with the `gofa` shortcut, where it would emit an
error if called from a directory containing no go source files (but
having subdirectories that _did_ contain go files).

Diff

 1diff --git a/plugins/golang/golang.plugin.zsh b/plugins/golang/golang.plugin.zsh
 2index d5c78ce6c2fd212fa7e8db29edf55d510b97a5ab..64c80e8646122d6557c50ebb952b767421746c5e 100644
 3--- a/plugins/golang/golang.plugin.zsh
 4+++ b/plugins/golang/golang.plugin.zsh
 5@@ -184,7 +184,7 @@ alias gob='go build'
 6 alias goc='go clean'
 7 alias god='go doc'
 8 alias gof='go fmt'
 9-alias gofa='go fmt . ./...'
10+alias gofa='go fmt ./...'
11 alias gog='go get'
12 alias goi='go install'
13 alias gol='go list'