bgentry / speakeasy

cross-platform Golang helpers for reading password input without cgo
Other
116 stars 24 forks source link

Add 'AskQuiet' to speakeasy #19

Closed Taek42 closed 8 years ago

Taek42 commented 8 years ago

AskQuiet will not prompt the user for a password, and will not print a carriage return. The user must know to type the password, because there will not be a prompt.

Was useful for me because I was sending output to stdout for piping to other processes, but still needed to ask for an encryption password.

Probably a narrow use case, but thought I'd PR anyway.

Taek42 commented 8 years ago

Sounds good to me. I have updated my PR to extend the FAsk function + documentation. Prompt is only written if io.Writer is not nil, and extra newline is only written if io.Writer is not nil.

bgentry commented 8 years ago

Looks great, thanks! :v: