32 lines
605 B
Go
32 lines
605 B
Go
package config
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/urfave/cli/v3"
|
|
)
|
|
|
|
// Category config
|
|
func Category() *cli.Command {
|
|
return &cli.Command{
|
|
Name: "config",
|
|
Usage: "command to interact with config",
|
|
Action: Action,
|
|
Commands: commands(),
|
|
HideHelpCommand: true,
|
|
}
|
|
}
|
|
|
|
// commands for Config Category
|
|
func commands() []*cli.Command {
|
|
return []*cli.Command{
|
|
CreateConfig(),
|
|
GetConfig(),
|
|
}
|
|
}
|
|
|
|
// Action show help command if no sub commands are given for Config
|
|
func Action(context context.Context, c *cli.Command) error {
|
|
return cli.ShowSubcommandHelp(c)
|
|
}
|