feat: reimplement influx secret CLI command (#125)

* refactor: rename `getPassword` to `getSecret`
This commit is contained in:
Dane Strandboge
2021-06-21 13:33:51 -05:00
committed by GitHub
parent a4fdefc392
commit 23e73e9146
21 changed files with 1777 additions and 20 deletions

View File

@ -161,12 +161,12 @@ func (c Client) SetPassword(ctx context.Context, params *SetPasswordParams) erro
var password string
for {
pass1, err := c.StdIO.GetPassword(fmt.Sprintf("Please type new password for %q", displayName), clients.MinPasswordLen)
pass1, err := c.StdIO.GetSecret(fmt.Sprintf("Please type new password for %q", displayName), clients.MinPasswordLen)
if err != nil {
return err
}
// Don't bother with the length check the 2nd time, since we check equality to pass1.
pass2, err := c.StdIO.GetPassword("Please type new password again", 0)
pass2, err := c.StdIO.GetSecret("Please type new password again", 0)
if err != nil {
return err
}