2018-05-05 09:24:37 +03:00

28 lines
362 B
Go

package commands
import (
"github.com/golangci/golangci-lint/pkg/config"
"github.com/spf13/cobra"
)
type Executor struct {
rootCmd *cobra.Command
cfg *config.Config
}
func NewExecutor() *Executor {
e := &Executor{
cfg: config.NewDefault(),
}
e.initRoot()
e.initRun()
return e
}
func (e Executor) Execute() error {
return e.rootCmd.Execute()
}