code: func Password(confirm bool, override *string) (string, error) {
  	preferences, err := prefs.NewPreferences()
  	if err != nil {
  		return "", err
  	}
  
  	label := "Password"
  	if override != nil {
  		label = *override
  	}
  
  	if !ui.Attached() {
  		return "", errs.ErrTerminalRequired
  	}
  
  	prompt := &promptui.Prompt{
  		Label:     label,
  		Mask:      pwMask,
  		Validate:  promptui.ValidateFunc(validate.Password),
  		IsVimMode: preferences.Core.Vim,
  	}
  
  	password, err := prompt.Run()
  	if err != nil {
  		return "", err
  	}
  
  	if !confirm {
  		return password, err
  	}
  
  	prompt = &promptui.Prompt{
  		Label:     "Confirm " + label,
  		Mask:      pwMask,
  		Validate:  promptui.ValidateFunc(validate.ConfirmPassword(password)),
  		IsVimMode: preferences.Core.Vim,
  	}
  
  	_, err = prompt.Run()
  	if err != nil {
  		return "", convertErr(err)
  	}
  
  	return password, nil
  }
docs: // Password prompts the user to provide a password. The value provided by the
  // user is masked.
  //
  // If confirm is true the user will be prompted to supply the password again.