zenity/pwd_unix.go
2022-05-11 18:19:13 +01:00

17 lines
395 B
Go

//go:build !windows && !darwin
package zenity
import "github.com/ncruces/zenity/internal/zenutil"
func password(opts options) (string, string, error) {
args := []string{"--password"}
args = appendTitle(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)
}