bugfix: Only display Cancel if explicitly asked for

This commit is contained in:
Dieter Eickstaedt 2022-11-21 15:39:30 +01:00
parent ccd452b35a
commit dfe8ce6a45

View file

@ -24,7 +24,11 @@ func (o Options) Run() error {
// set options
options = append(options, o.Affirmative)
options = append(options, o.Negative)
options = append(options, o.Canceled)
if o.WithCancel {
options = append(options, o.Canceled)
} else {
options = append(options, "")
}
// what is default
theDefault = o.Default