Skip to content

Commit

Permalink
use yes/no instead of true/false when prompting for a bool
Browse files Browse the repository at this point in the history
  • Loading branch information
nlf committed Oct 29, 2016
1 parent da4055f commit bf9fa1d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ui.go
Expand Up @@ -46,7 +46,12 @@ func askInt(question string, def int) int {
}

func askBool(question string, def bool) bool {
prompt := fmt.Sprintf("%s [%v]", question, def)
defString := "yes"
if !def {
defString = "no"
}

prompt := fmt.Sprintf("%s [%v]", question, defString)
res := ask(prompt)

switch strings.ToLower(res) {
Expand Down

0 comments on commit bf9fa1d

Please sign in to comment.