working commit
This commit is contained in:
@@ -16,6 +16,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
"mstore/pkg/client"
|
||||
"mstore/pkg/descr"
|
||||
@@ -33,6 +34,13 @@ func (util *GrantUtil) CreateGrantCmds() *cobra.Command {
|
||||
subCmd.PersistentFlags().StringVarP(&util.commonGrantParams.Password, "pass", "p", "", "Password")
|
||||
subCmd.PersistentFlags().Uint64VarP(&util.commonGrantParams.Timeout, "timeout", "t", defaultTimeout, "Operation timeout")
|
||||
|
||||
vi := viper.New()
|
||||
vi.SetEnvPrefix("mstore")
|
||||
vi.BindEnv("user")
|
||||
vi.BindEnv("pass")
|
||||
util.commonGrantParams.Username = vi.GetString("user")
|
||||
util.commonGrantParams.Password = vi.GetString("pass")
|
||||
|
||||
// CreateGrant
|
||||
var createGrantCmd = &cobra.Command{
|
||||
Use: "create [user:pass@]hostname[:port] username|accountId rigth pattern",
|
||||
|
||||
Reference in New Issue
Block a user