mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-10 08:44:28 +02:00
Fallthrough
This commit is contained in:
@@ -181,6 +181,10 @@ func learnFlowControl() {
|
|||||||
case 1:
|
case 1:
|
||||||
case 42:
|
case 42:
|
||||||
// Cases don't "fall through".
|
// Cases don't "fall through".
|
||||||
|
/*
|
||||||
|
There is a `fallthrough` keyword however, see:
|
||||||
|
https://github.com/golang/go/wiki/Switch#fall-through
|
||||||
|
*/
|
||||||
case 43:
|
case 43:
|
||||||
// Unreached.
|
// Unreached.
|
||||||
default:
|
default:
|
||||||
|
Reference in New Issue
Block a user