input

package
v0.25.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AskYesNo

func AskYesNo(prompt string) (bool, error)

AskYesNo prompts the user with a yes/no question and returns their boolean answer.

func IsTerminal added in v0.24.0

func IsTerminal() bool

IsTerminal reports whether standard input is connected to a terminal.

func PickEntry

func PickEntry(store string, query string) (string, error)

PickEntry interactively selects an entry using a fuzzy finder.

func ReadNewPassword

func ReadNewPassword(confirm bool) (string, error)

ReadNewPassword prompts the user to input a new password, optionally asking for confirmation by re-entering it.

func SecureRead

func SecureRead(prompt string) (string, error)

SecureRead reads a password without echo if standard input is a terminal. If a passphrase file descriptor has been configured, the passphrase is read from the next line of that descriptor instead.

func SetPassphraseFD added in v0.24.0

func SetPassphraseFD(descriptor int) error

SetPassphraseFD configures SecureRead to consume passphrases from the given file descriptor (one line per call) instead of prompting on stdin or the terminal. A negative descriptor disables the override.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL