summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/main.go b/main.go
index ea3de98..6645fb7 100644
--- a/main.go
+++ b/main.go
@@ -26,7 +26,7 @@ import (
func main() {
me = new(mainType)
- me.argv = argvpb.Autocomplete(&argv) // adds shell auto complete to go-args
+ argvpb.Init(&argv, APPNAME, BUILDTIME, VERSION) // adds shell auto-complete
me.pb = new(Files)
var s string
var err error
@@ -45,9 +45,9 @@ func main() {
// safe exits back to your shell (with timing and toolkit close)
if err != nil {
- me.argv.BadExit(s, err)
+ argvpb.BadExit(s, err)
}
- me.argv.GoodExit(s)
+ argvpb.GoodExit(s)
}
func okExit(s string) {
@@ -67,7 +67,7 @@ func doPrecheck() (string, error) {
if argv.Proto == "" {
// todo: run on every .proto file
log.Info("todo: run on all .proto files")
- argv.WriteHelp()
+ me.pp.WriteHelp(os.Stdout)
return "you must provide --proto <protoname>.proto", errors.New("need .proto")
}