anonymous struct and empty struct
Note that one interesting aspect of using struct{} for the type pushed to a channel (as opposed to int or bool), is that the size of an empty struct is… 0! See the recent article “The empty struct” (March 2014) by Dave Cheney. You can create as many struct{} as you want (struct{}{}) to push … Read more