mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 07:34:06 +08:00
update 18.10.md (#500)
This commit is contained in:
@@ -4,16 +4,16 @@
|
|||||||
|
|
||||||
```go
|
```go
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf(“Program stopping with error %v”, err)
|
fmt.Printf("Program stopping with error %v", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
或者:
|
或者:
|
||||||
|
|
||||||
```go
|
```go
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(“ERROR occurred: “ + err.Error())
|
panic("ERROR occurred: " + err.Error())
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user