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

@@ -22,6 +22,10 @@ import (
"github.com/spf13/cobra"
)
var (
_ cmder = (*genChromaStyles)(nil)
)
type genChromaStyles struct {
style string
highlightStyle string
@@ -29,6 +33,10 @@ type genChromaStyles struct {
cmd *cobra.Command
}
func (c *genChromaStyles) getCommand() *cobra.Command {
return c.cmd
}
// TODO(bep) highlight
func createGenChromaStyles() *genChromaStyles {
g := &genChromaStyles{