zenity/pwd.go

17 lines
475 B
Go
Raw Permalink Normal View History

2021-04-08 20:26:57 -04:00
package zenity
// Password displays the password dialog.
//
2022-06-02 07:24:24 -04:00
// Valid options: Title, OKLabel, CancelLabel, ExtraButton,
// WindowIcon, Attach, Modal, 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 })
}