Skip to content

Commit

Permalink
fix linter too
Browse files Browse the repository at this point in the history
  • Loading branch information
ldemailly committed Nov 21, 2023
1 parent 529654e commit 418a9b2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions http_logging_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,20 @@ func testHandler(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("hello"))
}

type NullHttpWriter struct{ doErr bool }
type NullHTTPWriter struct{ doErr bool }

func (n *NullHttpWriter) Header() http.Header {
func (n *NullHTTPWriter) Header() http.Header {
return nil
}

func (n *NullHttpWriter) Write(b []byte) (int, error) {
func (n *NullHTTPWriter) Write(b []byte) (int, error) {
if n.doErr {
return 0, fmt.Errorf("some fake http write error")
}
return len(b), nil
}

func (n *NullHttpWriter) WriteHeader(_ int) {}
func (n *NullHTTPWriter) WriteHeader(_ int) {}

func TestLogAndCall(t *testing.T) {
Config.LogFileAndLine = false
Expand All @@ -73,7 +73,7 @@ func TestLogAndCall(t *testing.T) {
w := bufio.NewWriter(&b)
SetOutput(w)
hr := &http.Request{}
n := &NullHttpWriter{}
n := &NullHTTPWriter{}
hw := &ResponseRecorder{w: n}
LogAndCall("test-log-and-call", testHandler).ServeHTTP(hw, hr)
w.Flush()
Expand Down

0 comments on commit 418a9b2

Please sign in to comment.