func PasswordPrompt(shouldConfirm bool) (string, error) {
	prompt := promptui.Prompt{
		Label: "Password",
		Mask:  '●',
		Validate: func(input string) error {
			length := len(input)
			if length >= 8 {
				return nil
			}
			if length > 0 {
				return promptui.NewValidationError("Passwords must be at least 8 characters")
			}

			return promptui.NewValidationError("Please enter your password")
		},
	}

	password, err := prompt.Run()
	if err != nil {
		return "", err
	}
	if !shouldConfirm {
		return password, err
	}

	prompt = promptui.Prompt{
		Label: "Confirm Password",
		Mask:  '●',
		Validate: func(input string) error {
			if len(input) > 0 {
				if input != password {
					return promptui.NewValidationError("Passwords do not match")
				}
				return nil
			}

			return promptui.NewValidationError("Please confirm your password")
		},
	}

	_, err = prompt.Run()
	if err != nil {
		return "", err
	}

	return password, nil
}
// PasswordPrompt prompts the user to input a password value
PasswordPrompt prompts the user to input a password value
// PasswordPrompt prompts the user to input a password value
func PasswordPrompt(shouldConfirm bool) (string, error) {
	prompt := promptui.Prompt{
		Label: "Password",
		Mask:  '●',
		Validate: func(input string) error {
			length := len(input)
			if length >= 8 {
				return nil
			}
			if length > 0 {
				return promptui.NewValidationError("Passwords must be at least 8 characters")
			}
			return promptui.NewValidationError("Please enter your password")
		},
	}
	password, err := prompt.Run()
	if err != nil {
		return "", err
	}
	if !shouldConfirm {
		return password, err
	}
	prompt = promptui.Prompt{
		Label: "Confirm Password",
		Mask:  '●',
		Validate: func(input string) error {
			if len(input) > 0 {
				if input != password {
					return promptui.NewValidationError("Passwords do not match")
				}
				return nil
			}
			return promptui.NewValidationError("Please confirm your password")
		},
	}
	_, err = prompt.Run()
	if err != nil {
		return "", err
	}
	return password, nil
}
func PasswordPrompt ( shouldConfirm bool ) ( string , error ) { prompt := promptui . Prompt { Label : " " , Mask : '●', Validate : func ( input string ) error { length := len ( input ) if length >= 8 { return nil } if length > 0 { return promptui . NewValidationError ( " " ) } return promptui . NewValidationError ( " " ) } , } password , err := prompt . Run ( ) if err != nil { return " " , err } if ! shouldConfirm { return password , err } prompt = promptui . Prompt { Label : " " , Mask : '●', Validate : func ( input string ) error { if len ( input ) > 0 { if input != password { return promptui . NewValidationError ( " " ) } return nil } return promptui . NewValidationError ( " " ) } , } _ , err = prompt . Run ( ) if err != nil { return " " , err } return password , nil }
PasswordPrompt prompts the user to input a password value
PasswordPrompt prompts the user to input a password value