I have an experience with C#, where I can work with commands from user like this:
string command;
while ( (command = GetCommandFromUser()) != EXIT_COMMAND )
ProcessCommand(command);
This simple code allows me get command from user (from Console or something like this) and process it.
But in Go
I have only this code:
var command string
for command = GetCommandFromUser(); command != ExitCommand; command = GetCommandFromUser() {
ProcessCommand(command)
}
Can I do it simply?