summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/main.go b/main.go
index a85de75..a98fb38 100644
--- a/main.go
+++ b/main.go
@@ -14,7 +14,10 @@ import (
var VERSION string
var BUILDTIME string
-var golangVersion string = "1.21"
+// used for shell auto completion
+var ARGNAME string = "go-mod-clean"
+
+var golangVersion string = "1.22"
var pp *arg.Parser
var forge *forgepb.Forge
@@ -27,6 +30,14 @@ func main() {
log.Info("go-mod-clean version", VERSION, "built on", BUILDTIME)
pp = arg.MustParse(&argv)
+ if argv.Bash {
+ argv.doBash()
+ os.Exit(0)
+ }
+ if len(argv.BashAuto) != 0 {
+ argv.doBashAuto()
+ os.Exit(0)
+ }
// load the ~/.config/forge/ config
// this lets you configure repos you have read/write access too
forge = forgepb.InitPB() // todo: make this scan only if pb file not found