Skip to content

Conversation

@kalexmills
Copy link
Contributor

The good exercises are the ones that lead you into making mistakes.

This was a good exercise.

At first, I tried to read by creating a new Scanner(os.Stdin). This was a mistake, since the ReadLine method ends up blocking the main thread. After about an hour of being cleverly wrong and trying to interrupt the user's prompt by writing EOF (0x4) to os.Stdin, I ended up looking at the solution to see how the teacher did it.

Lesson is to treat user input as yet another asynchronous message (yaam).

@joncalhoun
Copy link
Contributor

Glad you enjoyed the exercise. Sorry this is so delayed 😢

@joncalhoun joncalhoun merged commit d06f1d1 into gophercises:master Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants