shared/cmd/ask.go
func AskInt(question string, min int64, max int64, defaultAnswer string) int64 {
	for {
		answer := askQuestion(question, defaultAnswer)

		result, err := strconv.ParseInt(answer, 10, 64)

		if err == nil && (min == -1 || result >= min) && (max == -1 || result <= max) {
			return result
		}

		invalidInput()
	}
}
func AskInt(question string, min int64, max int64, defaultAnswer string) int64 {
	for {
		answer := askQuestion(question, defaultAnswer)

		result, err := strconv.ParseInt(answer, 10, 64)

		if err == nil && (min == -1 || result >= min) && (max == -1 || result <= max) {
			return result
		}

		invalidInput()
	}
}
// AskInt asks the user to enter an integer between a min and max value