Nested structs are really neat.
I'm working on a project where I'm querying dozens of external API services, and I had to create a separate type structs for each JSON object just to get the interesting info nested in the response.
I wonder why he's using a chan struct{} for the quit channel. Is there a reason for that? Is it more efficient?
Usually I use a boolean for that:
quit := make(chan bool)
<some code>
quit <- true