code: func AskForBool(ctx context.Context, text string, def bool) (bool, error) {
  	if ctxutil.IsAlwaysYes(ctx) {
  		return def, nil
  	}
  
  	choices := "y/N/q"
  	if def {
  		choices = "Y/n/q"
  	}
  
  	str, err := AskForString(ctx, text, choices)
  	if err != nil {
  		return false, errors.Wrapf(err, "failed to read user input")
  	}
  	switch str {
  	case "Y/n/q":
  		return true, nil
  	case "y/N/q":
  		return false, nil
  	}
  
  	str = strings.ToLower(string(str[0]))
  	switch str {
  	case "y":
  		return true, nil
  	case "n":
  		return false, nil
  	case "q":
  		return false, ErrAborted
  	default:
  		return false, errors.Errorf("Unknown answer: %s", str)
  	}
  }
docs: // AskForBool ask for a bool (yes or no) exactly once.
  // The empty answer uses the specified default, any other answer
  // is an error.