From f63032d2f216d62d149a8dc2f1df919999c41938 Mon Sep 17 00:00:00 2001 From: Kev Choi Date: Mon, 20 Apr 2015 23:26:38 -0700 Subject: Add default case to switch statement in Go --- go.html.markdown | 2 ++ 1 file changed, 2 insertions(+) (limited to 'go.html.markdown') diff --git a/go.html.markdown b/go.html.markdown index 17f10bd9..9b9758b4 100644 --- a/go.html.markdown +++ b/go.html.markdown @@ -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. -- cgit v1.2.3