mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-04-26 15:13:56 +00:00
Merge pull request #1044 from thisiskevinchoi/patch-1
Add default case to switch statement in Go
This commit is contained in:
commit
a5d38aedd5
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user