It's very nice and HOW

for {
		fmt.Fprintf(out, PROMPT)
		scanned := scanner.Scan()
		if !scanned{

HOW? How does it stop to work?

Can you clarify what you mean by “stop to work?”

Do you mean that the code above stopped working? If so, then we’ll need a more complete example to see what it could be.

Or do you mean what causes the loop to stop? If so, it’s the return statement which means to stop executing the current function and return to the caller.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.