mirror of
https://github.com/gopl-zh/gopl-zh.github.com.git
synced 2024-11-05 05:53:45 +00:00
Update ch7-13.md
This commit is contained in:
parent
9ca3fd63f0
commit
d280c6c7aa
@ -48,11 +48,11 @@ switch语句可以简化if-else链,如果这个if-else链对一连串值做相
|
||||
|
||||
```go
|
||||
switch x.(type) {
|
||||
case nil: // ...
|
||||
case int, uint: // ...
|
||||
case bool: // ...
|
||||
case string: // ...
|
||||
default: // ...
|
||||
case nil: // ...
|
||||
case int, uint: // ...
|
||||
case bool: // ...
|
||||
case string: // ...
|
||||
default: // ...
|
||||
}
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user