Skip to content

Commit f1405ec

Browse files
committed
Update example
1 parent a758acb commit f1405ec

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

examples/singleapp/diff_logfatal_and_logpanic/fatal/logfatal.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package main
22

33
import (
4-
"fmt"
54
"log"
65
"os"
76
)
@@ -16,6 +15,6 @@ func main() {
1615
//
1716
// REFERENCES:
1817
// - https://zenn.dev/spiegel/books/error-handling-in-golang/viewer/panics
19-
defer fmt.Println("call defer")
18+
defer l.Println("call defer")
2019
l.Fatalln("call log.Fatal")
2120
}

examples/singleapp/diff_logfatal_and_logpanic/panic/logpanic.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package main
22

33
import (
4-
"fmt"
54
"log"
65
"os"
76
)
@@ -16,6 +15,6 @@ func main() {
1615
//
1716
// REFERENCES:
1817
// - https://zenn.dev/spiegel/books/error-handling-in-golang/viewer/panics
19-
defer fmt.Println("call defer")
18+
defer l.Println("call defer")
2019
l.Panicln("call log.Panic")
2120
}

0 commit comments

Comments
 (0)