Created
January 29, 2018 07:12
-
-
Save campoy/1eb3f34eea159ad2376782640bc0077a to your computer and use it in GitHub Desktop.
This file contains 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
i, v, ok := reflect.Select(cases) | |
if !ok { | |
cases = append(cases[:i], cases[i+1:]...) | |
continue | |
} | |
out <- v.Interface().(int) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment