diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-04-09 18:38:21 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-04-11 09:48:56 +0200 |
commit | 7bc5e89fbaa5c613b8853ff7b69fae570bd0b56d (patch) | |
tree | 4122fd37d32737051b18847f68c64a3336557bb1 /commands/check.go | |
parent | fdf1d94ebc7d1aa4855c62237f2edbd4bdade1a7 (diff) |
commands: Make more commands non-global
See #4598
Diffstat (limited to 'commands/check.go')
-rw-r--r-- | commands/check.go | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/commands/check.go b/commands/check.go index e5dbc1ffa..5812bb6aa 100644 --- a/commands/check.go +++ b/commands/check.go @@ -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 } |