diff options
| -rw-r--r-- | argv.go | 2 | ||||
| -rw-r--r-- | doStats.go | 4 | ||||
| -rw-r--r-- | doVerify.go | 4 | ||||
| -rw-r--r-- | subCommand.go | 4 |
4 files changed, 7 insertions, 7 deletions
@@ -63,7 +63,6 @@ type FixCmd struct { type VerifyCmd struct { Namespace *EmptyCmd `arg:"subcommand:namespace" help:"check the namespaces"` - Stats *StatsCmd `arg:"subcommand:stats" help:"generate origin.pb"` DryRun bool `arg:"--dry-run" help:"try not to change anything"` } @@ -106,6 +105,7 @@ type DevCmd struct { 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"` } type GenerateCmd struct { @@ -15,7 +15,7 @@ import ( "google.golang.org/protobuf/types/known/timestamppb" ) -func doStats() (string, error) { +func doStats(cmd *StatsCmd) (string, error) { var allerr error if argv.All { for r := range me.forge.Repos.IterByFullPath() { @@ -32,7 +32,7 @@ func doStats() (string, error) { return "no repo", errors.New("working dir isn't a repo I know about") } - if argv.Verify.Stats.List { + if cmd.List { s := repo.Stats() s.SortPatchId() // s.SortCtime() diff --git a/doVerify.go b/doVerify.go index d32513e..846c4b9 100644 --- a/doVerify.go +++ b/doVerify.go @@ -16,10 +16,6 @@ func doVerify() (string, error) { var s string = "doVerify()" var err error - if argv.Verify.Stats != nil { - s, err = doStats() - } - if argv.Verify.Namespace != nil { s, err = doVerifyNamespace() } diff --git a/subCommand.go b/subCommand.go index d64ef5d..57fdafb 100644 --- a/subCommand.go +++ b/subCommand.go @@ -30,6 +30,10 @@ func doSubcommand() (string, error) { if argv.Dev.Fixer != nil { s, err = doFix(argv.Dev.Fixer) } + + if argv.Dev.Stats != nil { + s, err = doStats(argv.Dev.Stats) + } } if argv.Clean != nil { |
