diff --git a/api/api_logging_test.go b/api/api_logging_test.go index f08c3f7..2464734 100644 --- a/api/api_logging_test.go +++ b/api/api_logging_test.go @@ -159,7 +159,7 @@ func TestWriteIndentedN(t *testing.T) { } } -func TestLogResponse(t *testing.T) { +func TestLogResponse(_ *testing.T) { // Test case: Logging a successful response res := &http.Response{ StatusCode: http.StatusOK, @@ -234,17 +234,17 @@ func TestLogRequest(t *testing.T) { } // errorReader is a custom io.Reader that always returns an error when Read is called. -type errorReader struct { +type ErrorReader struct { err error } // NewErrorReader creates an instance of errorReader with the specified error. -func NewErrorReader(err error) *errorReader { - return &errorReader{err: err} +func NewErrorReader(err error) *ErrorReader { + return &ErrorReader{err: err} } // Read always returns an error (simulating a read failure). -func (r *errorReader) Read(p []byte) (n int, err error) { +func (r *ErrorReader) Read(_ []byte) (n int, err error) { return 0, r.err } diff --git a/fault_set_test.go b/fault_set_test.go index f78ca10..7eab1a7 100644 --- a/fault_set_test.go +++ b/fault_set_test.go @@ -361,7 +361,7 @@ func TestGetFaultSetByName(t *testing.T) { expectedErr: nil, }, "bad request": { - server: httptest.NewServer(http.HandlerFunc(func(resp http.ResponseWriter, req *http.Request) { + server: httptest.NewServer(http.HandlerFunc(func(resp http.ResponseWriter, _ *http.Request) { resp.WriteHeader(http.StatusBadRequest) resp.Write([]byte(`{"message":"bad request","httpStatusCode":400,"errorCode":0}`)) })),