Documentation
¶
Index ¶
- func IsPipedOrRedirected(fi os.FileInfo) bool
- func PromptNewPassword(w io.Writer, fd int, length int) ([]byte, error)
- func PromptPassword(w io.Writer, fd int) ([]byte, error)
- func PromptRead(w io.Writer, r io.Reader, prompt string, a ...any) (string, error)
- func PromptReadSecure(w io.Writer, fd int, prompt string, a ...any) ([]byte, error)
- func SetDefaultReadPassword(f func(fd int) ([]byte, error))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsPipedOrRedirected ¶
func PromptNewPassword ¶
PromptNewPassword prompts the user to enter a new password of the specified length. The prompt is displayed via the writer w, and input is read from the given file descriptor fd.
func PromptPassword ¶
PromptPassword prompts the user to enter the current password securely. The prompt is displayed via the writer w, and input is read from the given file descriptor fd.
func PromptRead ¶
PromptRead prompts via w for input and reads it from r until a newline is entered.
func PromptReadSecure ¶
PromptReadSecure prompts the user via w for input and securely reads it from the given file descriptor.
func SetDefaultReadPassword ¶
SetDefaultReadPassword overrides readPasswordFunc for testing.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.