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))
|
|
|
|
}
|
|
|
|
|
2022-07-27 19:11:12 -04:00
|
|
|
// Username returns an Option to display the username.
|
2021-04-08 20:26:57 -04:00
|
|
|
func Username() Option {
|
|
|
|
return funcOption(func(o *options) { o.username = true })
|
|
|
|
}
|