diff --git a/cmd/wiretrustee/cmd_start.go b/cmd/wiretrustee/cmd_start.go index f5b69458c..314329ac9 100644 --- a/cmd/wiretrustee/cmd_start.go +++ b/cmd/wiretrustee/cmd_start.go @@ -5,7 +5,6 @@ import ( log "github.com/sirupsen/logrus" "github.com/spf13/cobra" "github.com/wiretrustee/wiretrustee/signal" - "github.com/wiretrustee/wiretrustee/signal/proto" "os" ) @@ -13,6 +12,13 @@ const ( ExitSetupFailed = 1 ) +var ( + opts struct { + config string + logLevel string + } +) + func init() { runCmd := &cobra.Command{ Use: "start", @@ -41,7 +47,9 @@ func init() { select {} }, } - rootCmd.AddCommand(runCmd) + + // todo generate config if doesn't exist + runCmd.PersistentFlags().StringVar(&opts.config, "config", "", "--config ") } func ReadConfig(path string) (*Config, error) {