Skip to content

Commit

Permalink
Add default case to switch statement in Go
Browse files Browse the repository at this point in the history
  • Loading branch information
thisiskevinchoi committed Apr 21, 2015
1 parent 4d1bc86 commit f63032d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions go.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ func learnFlowControl() {
// Cases don't "fall through".
case 43:
// Unreached.
default:
// Default case is optional.
}
// Like if, for doesn't use parens either.
// Variables declared in for and if are local to their scope.
Expand Down

0 comments on commit f63032d

Please sign in to comment.