chore: update switch case code format

嗯 就是个格式问题,case 前面没有空格。
This commit is contained in:
Hongbo Miao 2020-03-12 18:17:38 +08:00
parent bf67e042e9
commit 373cc5de79

View File

@ -8,12 +8,12 @@ Go的类型系统会在编译时捕获很多错误但有些错误只能在运
```Go
switch s := suit(drawCard()); s {
case "Spades": // ...
case "Hearts": // ...
case "Diamonds": // ...
case "Clubs": // ...
default:
panic(fmt.Sprintf("invalid suit %q", s)) // Joker?
case "Spades": // ...
case "Hearts": // ...
case "Diamonds": // ...
case "Clubs": // ...
default:
panic(fmt.Sprintf("invalid suit %q", s)) // Joker?
}
```