zenity/pwd.go

16 lines
451 B
Go
Raw 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
//
2022-05-12 09:27:24 -04:00
// May return: ErrCanceled, ErrExtraButton.
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 })
}