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
}
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.
package prompts
import (
	"fmt"
	"github.com/manifoldco/promptui"
	"github.com/manifoldco/torus-cli/errs"
	"github.com/manifoldco/torus-cli/prefs"
	"github.com/manifoldco/torus-cli/ui"
	"github.com/manifoldco/torus-cli/validate"
)
type StringPrompt func(string, bool) (string, error)
var Email StringPrompt
var InviteCode StringPrompt
var VerificationCode StringPrompt
var FullName StringPrompt
var Username StringPrompt
var OrgName StringPrompt
var TeamName StringPrompt
var RoleName StringPrompt
var ProjectName StringPrompt
var EnvName StringPrompt
var ServiceName StringPrompt
var MachineName StringPrompt
var DefaultWarning = "The actions you are about to perform cannot be undone."
const pwMask = '●'