working commit
This commit is contained in:
@@ -16,6 +16,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
"mstore/app/descr"
|
||||
"mstore/pkg/client"
|
||||
@@ -115,6 +116,14 @@ func (util *AccountUtil) CreateAccountCmds() *cobra.Command {
|
||||
listAccountsCmd.MarkFlagRequired("host")
|
||||
subCmd.AddCommand(listAccountsCmd)
|
||||
|
||||
viper.BindPFlags(subCmd.Flags())
|
||||
viper.SetEnvPrefix("MSTORE")
|
||||
|
||||
// Bind environment variables
|
||||
viper.BindEnv("user")
|
||||
viper.BindEnv("pass")
|
||||
viper.BindEnv("host")
|
||||
|
||||
return subCmd
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user