Last active
December 21, 2016 04:23
-
-
Save deckarep/43747ba522b0971bc153bb701c70e7a5 to your computer and use it in GitHub Desktop.
Breaking Go's mantra
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
func adder(amount int) { | |
for item := range adderChannel { | |
item.number += amount | |
doublerChannel <- item | |
fmt.Println(item.number) // <-- uh oh! | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment