zenity/pwd_unix.go
2024-09-06 11:16:18 -04:00

17 lines
397 B
Go

//go:build !windows && !darwin
package zenity
import "git.bigun.dev/evan/zenity/internal/zenutil"
func password(opts options) (string, string, error) {
args := []string{"--password"}
args = appendGeneral(args, opts)
args = appendButtons(args, opts)
if opts.username {
args = append(args, "--username")
}
out, err := zenutil.Run(opts.ctx, args)
return pwdResult("|", opts, out, err)
}