Skip to content

Commit 97dc48a

Browse files
committedAug 14, 2020
chore: output a newline when ListenAndServe failed
1 parent 53b9368 commit 97dc48a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎examples/go/app.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ func main() {
1111

1212
fmt.Println("Listen on 3000")
1313
if err := http.ListenAndServe(":3000", r); err != nil {
14-
fmt.Fprintf(os.Stderr, "ListenAndServe failed: %v", err)
14+
fmt.Fprintf(os.Stderr, "ListenAndServe failed: %v\n", err)
1515
os.Exit(1)
1616
}
1717
}

‎src/templates/app.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ func main() {
1111

1212
fmt.Println("Listen on 3000")
1313
if err := http.ListenAndServe(":3000", r); err != nil {
14-
fmt.Fprintf(os.Stderr, "ListenAndServe failed: %v", err)
14+
fmt.Fprintf(os.Stderr, "ListenAndServe failed: %v\n", err)
1515
os.Exit(1)
1616
}
1717
}

0 commit comments

Comments
 (0)
Please sign in to comment.