working commit

This commit is contained in:
2026-02-20 13:05:57 +02:00
parent 903a03cf89
commit dcb22b58d9
4 changed files with 37 additions and 5 deletions
+8
View File
@@ -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",