Use bufio.ReadString to read user input.#68
Conversation
fmt.Scanln treates spaces as a discontinuation of input according to http://golang.org/pkg/fmt/#Scanln
|
@kytrinyx I also noticed that the error set when failing to make the directory is not being displayed. https://github.com/exercism/cli/blob/master/exercism.go#L57-L60 Not sure if you wanted to handle this with a |
|
Thank you for this! I don't really know what the idiomatic approach is, which is why there's no consistent approach right now. What do you think? Just panic? |
Use bufio.ReadString to read user input.
|
I'm actually not sure either 😊 I think that a nicely formatted message to the user might cause a bit less Currently, it creates the file but it does it with empty values for each of the attributes. |
|
Hm. Good points, all. I think you're right that a friendly message would be better. Also, I think it should fail to create the config file. |
|
Sounds good! I'll get working on that. |
Use bufio.ReadString to read user input.
fmt.Scanlntreates spaces as a discontinuation of input according to http://golang.org/pkg/fmt/#ScanlnFixes #65