zenity/pwd.go

16 lines
467 B
Go
Raw Permalink Normal View History

2021-04-08 20:26:57 -04:00
package zenity
// Password displays the password dialog.
//
// Valid options: Title, OKLabel, CancelLabel, ExtraButton, Icon, Username.
2022-03-25 20:58:27 -04:00
//
// May return: ErrCanceled, ErrExtraButton, ErrUnsupported.
2021-07-12 20:43:52 -04:00
func Password(options ...Option) (usr string, pwd string, err error) {
2021-04-08 20:26:57 -04:00
return password(applyOptions(options))
}
// Username returns an Option to display the username (Unix only).
func Username() Option {
return funcOption(func(o *options) { o.username = true })
}