code: func (w *wizard) readInt() int {
  	for {
  		fmt.Printf("> ")
  		text, err := w.in.ReadString('\n')
  		if err != nil {
  			log.Crit("Failed to read user input", "err", err)
  		}
  		if text = strings.TrimSpace(text); text == "" {
  			continue
  		}
  		val, err := strconv.Atoi(strings.TrimSpace(text))
  		if err != nil {
  			log.Error("Invalid input, expected integer", "err", err)
  			continue
  		}
  		return val
  	}
  }
docs: // readInt reads a single line from stdin, trimming if from spaces, enforcing it
  // to parse into an integer.