Go Daily Tips
Showing posts with label
switch
.
Show all posts
Showing posts with label
switch
.
Show all posts
Thursday, January 15, 2015
Multiple switch cases
Switch cases can be separated by coma:
func shouldEscape(c byte) bool {
switch c {
case ' ', '?', '&', '=', '#', '+', '%':
return true
}
return false
}
Older Posts
Home
Subscribe to:
Posts (Atom)