summaryrefslogtreecommitdiffstats
path: root/commands/check.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-04-09 18:38:21 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-04-11 09:48:56 +0200
commit7bc5e89fbaa5c613b8853ff7b69fae570bd0b56d (patch)
tree4122fd37d32737051b18847f68c64a3336557bb1 /commands/check.go
parentfdf1d94ebc7d1aa4855c62237f2edbd4bdade1a7 (diff)
commands: Make more commands non-global
See #4598
Diffstat (limited to 'commands/check.go')
-rw-r--r--commands/check.go19
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
}