Skip to content

Commit

Permalink
fix: refactor error handling and testing infrastructure
Browse files Browse the repository at this point in the history
- Handle the error returned by `io.WriteString` in `basicHelloHandler` function

Signed-off-by: appleboy <appleboy.tw@gmail.com>
  • Loading branch information
appleboy committed Oct 31, 2024
1 parent c650d57 commit 9108f52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gofight_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

func basicHelloHandler(w http.ResponseWriter, r *http.Request) {
io.WriteString(w, "Hello World")
_, _ = io.WriteString(w, "Hello World")
}

func basicEngine() http.Handler {
Expand Down

0 comments on commit 9108f52

Please sign in to comment.