mirror of
https://github.com/netbirdio/netbird.git
synced 2024-12-01 12:33:53 +01:00
chore: run cmd
This commit is contained in:
parent
6b3ba0feaf
commit
a820d83a39
@ -5,7 +5,6 @@ import (
|
|||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/wiretrustee/wiretrustee/signal"
|
"github.com/wiretrustee/wiretrustee/signal"
|
||||||
"github.com/wiretrustee/wiretrustee/signal/proto"
|
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -13,6 +12,13 @@ const (
|
|||||||
ExitSetupFailed = 1
|
ExitSetupFailed = 1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
opts struct {
|
||||||
|
config string
|
||||||
|
logLevel string
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
runCmd := &cobra.Command{
|
runCmd := &cobra.Command{
|
||||||
Use: "start",
|
Use: "start",
|
||||||
@ -41,7 +47,9 @@ func init() {
|
|||||||
select {}
|
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) {
|
func ReadConfig(path string) (*Config, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user