commands: Make the list commands non-global

See #4598
This commit is contained in:
Bjørn Erik Pedersen
2018-04-09 20:42:08 +02:00
parent 2a2c983867
commit e26a8b242a
4 changed files with 127 additions and 100 deletions

View File

@@ -23,11 +23,19 @@ import (
"github.com/spf13/cobra"
)
var (
_ cmder = (*genDocsHelper)(nil)
)
type genDocsHelper struct {
target string
cmd *cobra.Command
}
func (c *genDocsHelper) getCommand() *cobra.Command {
return c.cmd
}
func createGenDocsHelper() *genDocsHelper {
g := &genDocsHelper{
cmd: &cobra.Command{