From 1b880afc2b8f8934580256f4b676401b844d1bf6 Mon Sep 17 00:00:00 2001 From: nannanwu Date: Fri, 7 Nov 2025 21:06:49 +0800 Subject: [PATCH] =?UTF-8?q?switch=E5=88=86=E6=94=AF2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/modules.xml | 2 +- .idea/vcs.xml | 2 +- main.go | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.idea/modules.xml b/.idea/modules.xml index cc47053..0d30011 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 94a25f7..35eb1dd 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/main.go b/main.go index 02c9d2b..8fd72b5 100644 --- a/main.go +++ b/main.go @@ -11,6 +11,8 @@ func main() { fmt.Println("You are 9%") case 8: fmt.Println("You are 8%") + //switch传透下一层 + fallthrough case 7: fmt.Println("You are 7%") case 6: