summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-28 17:03:56 -0600
committerJeff Carr <[email protected]>2025-01-28 17:03:56 -0600
commit51ec39d1579c6bd89d6c5c38a1ff2879c37d3d03 (patch)
treeee793a1a3c0e909e200e145a5e8a59587b81ea1a /main.go
parent7402aaded7b9f9587eb5ba863b732c9c9e8ee9fe (diff)
cleanup argv handling. go-arg saves the day
Diffstat (limited to 'main.go')
-rw-r--r--main.go31
1 files changed, 13 insertions, 18 deletions
diff --git a/main.go b/main.go
index 4493572..7751b8c 100644
--- a/main.go
+++ b/main.go
@@ -79,6 +79,18 @@ func main() {
}
if argv.Clean != nil {
+ if argv.Clean.Examine != nil {
+ if err := doExamine(); err != nil {
+ badExit(err)
+ }
+ okExit("")
+ }
+ if argv.Clean.GitReset != nil {
+ findAll() // select all the repos
+ doGitReset()
+ okExit("reset")
+ }
+
if err := doClean(); err != nil {
badExit(err)
}
@@ -90,18 +102,6 @@ func main() {
okExit("")
}
- if argv.Examine != nil {
- if err := doExamine(); err != nil {
- badExit(err)
- }
- okExit("")
- }
-
- if argv.Rescan != nil {
- me.forge.ScanGoSrc()
- okExit("")
- }
-
if argv.Show != "" {
repo := me.forge.FindByGoPath(argv.Show)
me.forge.HumanPrintRepo(repo)
@@ -131,18 +131,13 @@ func main() {
okExit("")
}
- if argv.GitReset != nil {
- findAll() // select all the repos
- doGitReset()
- okExit("reset")
- }
-
if argv.List != nil {
argv.List.findRepos()
// print out the repos
me.forge.PrintHumanTable(me.found)
okExit("")
}
+
if argv.Patch != nil {
if argv.Patch.Submit != "" {
doSubmit(argv.Patch.Submit)