Created
September 29, 2017 00:40
-
-
Save eriknelson/2c27f8006ee0008a82fa51ea79b24660 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
agg := make(chan string) | |
for _, ch := range chans { | |
go func(c chan string) { | |
for msg := range c { | |
agg <- msg | |
} | |
}(ch) | |
} | |
select { | |
case msg <- agg: | |
fmt.Println("received ", msg) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment