Jan Schaumann on Nostr: Reminder that if you write Go cli tools and want to accept passwords from the user, I ...
Reminder that if you write Go cli tools and want to accept passwords from the user, I have a neat little module for you:
https://github.com/jschauma/getpass
It supports getting a password from:
- a command (`cmd:command`)
- an environment variable (`env:var`)
- a file (`file:path`)
- the macOS keychain (`keychain:name`)
- LastPass (`lpass:name`)
- 1Password (`op:name`)
- the command-line if you absolutely must (`pass:password`)
- the controllying tty (`tty[:prompt]`)
https://github.com/jschauma/getpass
It supports getting a password from:
- a command (`cmd:command`)
- an environment variable (`env:var`)
- a file (`file:path`)
- the macOS keychain (`keychain:name`)
- LastPass (`lpass:name`)
- 1Password (`op:name`)
- the command-line if you absolutely must (`pass:password`)
- the controllying tty (`tty[:prompt]`)