miner: Group CLI commands

This commit is contained in:
Łukasz Magiera 2020-07-21 19:19:47 +02:00
parent 116e34d7ef
commit ff3236ef36
2 changed files with 24 additions and 24 deletions

View File

@ -242,24 +242,24 @@ var CommonCommands = []*cli.Command{
}
var Commands = []*cli.Command{
withCategory("basic", sendCmd),
withCategory("basic", walletCmd),
withCategory("basic", clientCmd),
withCategory("basic", multisigCmd),
withCategory("basic", paychCmd),
withCategory("developer", authCmd),
withCategory("developer", mpoolCmd),
withCategory("developer", stateCmd),
withCategory("developer", chainCmd),
withCategory("developer", logCmd),
withCategory("developer", waitApiCmd),
withCategory("developer", fetchParamCmd),
withCategory("network", netCmd),
withCategory("network", syncCmd),
WithCategory("basic", sendCmd),
WithCategory("basic", walletCmd),
WithCategory("basic", clientCmd),
WithCategory("basic", multisigCmd),
WithCategory("basic", paychCmd),
WithCategory("developer", authCmd),
WithCategory("developer", mpoolCmd),
WithCategory("developer", stateCmd),
WithCategory("developer", chainCmd),
WithCategory("developer", logCmd),
WithCategory("developer", waitApiCmd),
WithCategory("developer", fetchParamCmd),
WithCategory("network", netCmd),
WithCategory("network", syncCmd),
versionCmd,
}
func withCategory(cat string, cmd *cli.Command) *cli.Command {
func WithCategory(cat string, cmd *cli.Command) *cli.Command {
cmd.Category = cat
return cmd
}

View File

@ -30,18 +30,18 @@ func main() {
lotuslog.SetupLogLevels()
local := []*cli.Command{
actorCmd,
storageDealsCmd,
retrievalDealsCmd,
infoCmd,
initCmd,
rewardsCmd,
runCmd,
stopCmd,
sectorsCmd,
storageCmd,
workersCmd,
provingCmd,
lcli.WithCategory("chain", actorCmd),
lcli.WithCategory("chain", rewardsCmd),
lcli.WithCategory("chain", infoCmd),
lcli.WithCategory("market", storageDealsCmd),
lcli.WithCategory("market", retrievalDealsCmd),
lcli.WithCategory("storage", sectorsCmd),
lcli.WithCategory("storage", provingCmd),
lcli.WithCategory("storage", storageCmd),
lcli.WithCategory("storage", workersCmd),
}
jaeger := tracing.SetupJaegerTracing("lotus")
defer func() {