2022-03-24 10:37:37 -04:00
|
|
|
//go:build !windows && !darwin
|
2021-04-08 20:26:57 -04:00
|
|
|
|
|
|
|
package zenity
|
|
|
|
|
2024-07-10 00:06:01 -04:00
|
|
|
import "git.bigun.dev/evan/zenity/internal/zenutil"
|
2021-04-08 20:26:57 -04:00
|
|
|
|
2021-04-29 11:05:28 -04:00
|
|
|
func password(opts options) (string, string, error) {
|
2021-04-08 20:26:57 -04:00
|
|
|
args := []string{"--password"}
|
2022-06-02 07:24:24 -04:00
|
|
|
args = appendGeneral(args, opts)
|
2021-04-08 20:26:57 -04:00
|
|
|
args = appendButtons(args, opts)
|
|
|
|
if opts.username {
|
|
|
|
args = append(args, "--username")
|
|
|
|
}
|
|
|
|
|
|
|
|
out, err := zenutil.Run(opts.ctx, args)
|
2022-05-11 12:49:15 -04:00
|
|
|
return pwdResult("|", opts, out, err)
|
2021-04-08 20:26:57 -04:00
|
|
|
}
|