mirror of
https://codeberg.org/shroff/phylum.git
synced 2026-01-06 03:31:02 -06:00
[server][cmd] clean up debug flag
This commit is contained in:
@@ -12,8 +12,6 @@ import (
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
var debug bool = false
|
||||
|
||||
func SetupCommand() {
|
||||
viper.SetEnvPrefix("phylum")
|
||||
|
||||
@@ -39,7 +37,7 @@ func SetupCommand() {
|
||||
os.Mkdir(workDir, 0750)
|
||||
os.Chdir(workDir)
|
||||
}
|
||||
debug = viper.GetBool("debug")
|
||||
debug := viper.GetBool("debug")
|
||||
if debug {
|
||||
logrus.Info("Running in debug mode")
|
||||
logrus.SetLevel(logrus.TraceLevel)
|
||||
@@ -59,7 +57,7 @@ func SetupCommand() {
|
||||
}()
|
||||
|
||||
rootCmd.AddCommand([]*cobra.Command{
|
||||
appcmd.SetupCommand(debug),
|
||||
appcmd.SetupCommand(),
|
||||
setupSchemaCommand(),
|
||||
}...)
|
||||
rootCmd.Execute()
|
||||
|
||||
Reference in New Issue
Block a user