DEV Community


Discussion on: Attempting to Learn Go - Building Dev Log Part 03

ladydascalie profile image
Benjamin Cable

Worth considering as well that using a Reader rather than a concrete file here will make testing this easier later anyway, since you'll be able to use any Reader. not just a file, you can mock your input using buffers or any old strings.NewReader("thing")!

Thanks for taking the time to respond.

Thread Thread
shindakun profile image
Steve Layton Author

That is a fantastic point! I think using a Reader is going to be the way I go.