From 20670ec7bb9c78fe2a714760c4458c605f457df4 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Fri, 9 May 2025 17:35:25 +0000 Subject: [PATCH] Rename integer input function to clarify it is capable of returning negative values --- front/input.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/front/input.go b/front/input.go index 4b9fdf8..b1dc1c3 100644 --- a/front/input.go +++ b/front/input.go @@ -36,9 +36,9 @@ func InputBinary(prompt string) bool { return false } -// InputPositiveInt prompts the user for input and returns the input as an integer. +// InputInt prompts the user for input and returns the input as an integer. // A negative min/max value will disable the respective limit. -func InputPositiveInt(prompt string, min, max int) int { +func InputInt(prompt string, min, max int) int { for { fmt.Print("\n" + prompt + " ") var userInput int @@ -54,5 +54,5 @@ func InputMenuGen(prompt string, options []string) int { for i, option := range options { fmt.Printf("%d. %s\n", i+1, option) } - return InputPositiveInt(prompt, 1, len(options)) + return InputInt(prompt, 1, len(options)) }