diff options
Diffstat (limited to 'argv.go')
| -rw-r--r-- | argv.go | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -3,7 +3,7 @@ package main import ( "os" - "go.wit.com/lib/gui/prep" + "go.wit.com/lib/protobuf/argvpb" ) /* @@ -27,10 +27,6 @@ type args struct { type EmptyCmd struct { } -func (args) Version() string { - return "go-mod-clean " + VERSION + " Built on " + BUILDTIME -} - func (a args) Description() string { return ` go-mod-clean will try to verify your go.* files are using the newest package versions @@ -54,9 +50,15 @@ func (args) Buildtime() (string, string) { return BUILDTIME, VERSION } -func (a args) DoAutoComplete(pb *prep.Auto) { +func (args) Version() string { + return argvpb.StandardVersion(ARGNAME, VERSION, BUILDTIME) +} + +// sends the strings to bash or zsh that will be your options +func (a args) SendCompletionStrings(pb *argvpb.Argv) { if pb.Cmd == "" { - pb.Autocomplete3([]string{"strict", "--restore", "purge", "lax", "--version"}) + base := []string{"strict", "--restore", "purge", "lax", "--version"} + pb.SendStrings(base) } else { pb.SubCommand(pb.Goargs...) } |
