summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--argv.go20
-rw-r--r--doVerifyNamespace.go (renamed from doVerify.go)11
-rw-r--r--subCommand.go7
3 files changed, 13 insertions, 25 deletions
diff --git a/argv.go b/argv.go
index 4d1b935..fc828e9 100644
--- a/argv.go
+++ b/argv.go
@@ -10,12 +10,12 @@ package main
var argv args
type args struct {
- Rebuild *RebuildCmd `arg:"subcommand:rebuild" help:"download all the forge sources and rebuild forge"`
- Generate *GenerateCmd `arg:"subcommand:generate" help:"helps run autogenpb in repos with .proto files"`
Show *ShowCmd `arg:"subcommand:show" help:"show tables"`
- Clean *EmptyCmd `arg:"subcommand:clean" help:"'git clean' + reset repos to original state"`
Commit *CommitCmd `arg:"subcommand:commit" help:"'git commit'"`
Merge *MergeCmd `arg:"subcommand:merge" help:"merge branches"`
+ Rebuild *RebuildCmd `arg:"subcommand:rebuild" help:"download all the forge sources and rebuild forge"`
+ Generate *GenerateCmd `arg:"subcommand:generate" help:"helps run autogenpb in repos with .proto files"`
+ Clean *EmptyCmd `arg:"subcommand:clean" help:"'git clean' + reset repos to original state"`
Pull *PullCmd `arg:"subcommand:pull" help:"'git pull'"`
Normal *EmptyCmd `arg:"subcommand:normal" help:"shortcut to 'forge mode normal'"`
Patch *PatchCmd `arg:"subcommand:patch" help:"work with patches"`
@@ -62,8 +62,7 @@ type FixCmd struct {
}
type VerifyCmd struct {
- Namespace *EmptyCmd `arg:"subcommand:namespace" help:"check the namespaces"`
- DryRun bool `arg:"--dry-run" help:"try not to change anything"`
+ DryRun bool `arg:"--dry-run" help:"try not to change anything"`
}
type StatsCmd struct {
@@ -101,11 +100,12 @@ type CommitCmd struct {
}
type DevCmd struct {
- Build *EmptyCmd `arg:"subcommand:build" help:"build this repo"`
- Install *EmptyCmd `arg:"subcommand:install" help:"build & install this repo"`
- Fixer *FixCmd `arg:"subcommand:fixer" help:"send in the fixer"`
- URL string `arg:"--connect" help:"forge url"`
- Stats *StatsCmd `arg:"subcommand:stats" help:"generate origin.pb"`
+ Build *EmptyCmd `arg:"subcommand:build" help:"build this repo"`
+ Install *EmptyCmd `arg:"subcommand:install" help:"build & install this repo"`
+ Fixer *FixCmd `arg:"subcommand:fixer" help:"send in the fixer"`
+ URL string `arg:"--connect" help:"forge url"`
+ Stats *StatsCmd `arg:"subcommand:stats" help:"generate origin.pb"`
+ Namespace *EmptyCmd `arg:"subcommand:namespace" help:"check the namespaces"`
}
type GenerateCmd struct {
diff --git a/doVerify.go b/doVerifyNamespace.go
index 846c4b9..b3a6820 100644
--- a/doVerify.go
+++ b/doVerifyNamespace.go
@@ -12,17 +12,6 @@ import (
"go.wit.com/log"
)
-func doVerify() (string, error) {
- var s string = "doVerify()"
- var err error
-
- if argv.Verify.Namespace != nil {
- s, err = doVerifyNamespace()
- }
-
- return s, err
-}
-
func cleanNamespace(r *gitpb.Repo) string {
// check for GO repos
gowork := env.Get("gopath")
diff --git a/subCommand.go b/subCommand.go
index 57fdafb..be19e18 100644
--- a/subCommand.go
+++ b/subCommand.go
@@ -34,6 +34,9 @@ func doSubcommand() (string, error) {
if argv.Dev.Stats != nil {
s, err = doStats(argv.Dev.Stats)
}
+ if argv.Dev.Namespace != nil {
+ s, err = doVerifyNamespace()
+ }
}
if argv.Clean != nil {
@@ -90,9 +93,5 @@ func doSubcommand() (string, error) {
s, err = doRebuild()
}
- if argv.Verify != nil {
- s, err = doVerify()
- }
-
return s, err
}