Coding assignment issue for loop

I’m building a (very) small grocery store as a class assignment. I’m trying to figure out how to break out of this loop I built if the 7 key is pressed. When I run it (github) it wont break the loop if 7 is entered. Any idea why? Thanks in advanced.
(fyi variables are all created, cinreader is present, The loop runs, I just can’t break out of the loop)

userInput = reader.ReadIntegerRange(1, 7)
for userInput != 7 {
if userInput == 1 {
subtotal += bananas
} else if userInput == 2 {
subtotal += chicken
} else if userInput == 3 {
subtotal += eggs
} else if userInput == 4 {
subtotal += proteinBars
} else if userInput == 5 {
subtotal += oatmeal
} else if userInput == 6 {
subtotal += blueBerries
} else{
break
}

Check if ReadIntegerRange includes the upper limit. You can also use a fmt.Println(userInput ) to check which number is being processing inside the for and before enter to the nest of ifs… Also (maybe you will check later in your course) using an switch gives your additional readability and simplicity in your code.