commands: Make more commands non-global

See #4598
This commit is contained in:
Bjørn Erik Pedersen
2018-04-09 18:38:21 +02:00
parent fdf1d94ebc
commit 7bc5e89fba
4 changed files with 63 additions and 35 deletions

View File

@@ -17,7 +17,20 @@ import (
"github.com/spf13/cobra"
)
var checkCmd = &cobra.Command{
Use: "check",
Short: "Contains some verification checks",
var _ cmder = (*checkCmd)(nil)
type checkCmd struct {
cmd *cobra.Command
}
func newCheckCmd() *checkCmd {
return &checkCmd{cmd: &cobra.Command{
Use: "check",
Short: "Contains some verification checks",
},
}
}
func (c *checkCmd) getCommand() *cobra.Command {
return c.cmd
}