summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-19 04:39:13 -0500
committerJeff Carr <[email protected]>2025-10-19 04:39:13 -0500
commit7e204190a6c40815bcc37aed4ae7f473429a7c0f (patch)
tree0b76b33104a3cf13c82dcf05c870085d9d8e83b0 /main.go
parent6fb037663859bc50ac1d5bac1fdbfc722b1ab23d (diff)
new argvv0.5.29
Diffstat (limited to 'main.go')
-rw-r--r--main.go14
1 files changed, 4 insertions, 10 deletions
diff --git a/main.go b/main.go
index c94b7f3..ea3de98 100644
--- a/main.go
+++ b/main.go
@@ -24,15 +24,9 @@ import (
"go.wit.com/log"
)
-// sent via -ldflags
-var VERSION string
-var BUILDTIME string
-
-var ARGNAME string = "autogenpb"
-
func main() {
me = new(mainType)
- me.sh = argvpb.Autocomplete(&argv) // adds shell auto complete to go-args
+ me.argv = argvpb.Autocomplete(&argv) // adds shell auto complete to go-args
me.pb = new(Files)
var s string
var err error
@@ -51,9 +45,9 @@ func main() {
// safe exits back to your shell (with timing and toolkit close)
if err != nil {
- me.sh.BadExit(s, err)
+ me.argv.BadExit(s, err)
}
- me.sh.GoodExit(s)
+ me.argv.GoodExit(s)
}
func okExit(s string) {
@@ -73,7 +67,7 @@ func doPrecheck() (string, error) {
if argv.Proto == "" {
// todo: run on every .proto file
log.Info("todo: run on all .proto files")
- me.sh.WriteHelp()
+ argv.WriteHelp()
return "you must provide --proto <protoname>.proto", errors.New("need .proto")
}