mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-29 11:33:48 +01:00
chore: run cmd
This commit is contained in:
parent
6b3ba0feaf
commit
a820d83a39
@ -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 <config file path>")
|
||||
}
|
||||
|
||||
func ReadConfig(path string) (*Config, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user