Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: remove redundant error check #1741

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ linters-settings:
- sloppyReassign
- unnamedResult
- whyNoLint
govet:
enable-all: true
disable:
- fieldalignment
alexandear marked this conversation as resolved.
Show resolved Hide resolved
- shadow

issues:
# Show all issues from a linter.
Expand Down
4 changes: 2 additions & 2 deletions server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4146,7 +4146,7 @@ func TestMaxReadTimeoutPerRequest(t *testing.T) {

select {
case err := <-ch:
if err == nil || err != nil && !strings.EqualFold(err.Error(), "timeout") {
if err == nil || !strings.EqualFold(err.Error(), "timeout") {
t.Fatalf("Unexpected error from serveConn: %v", err)
}
case <-time.After(time.Second):
Expand Down Expand Up @@ -4206,7 +4206,7 @@ func TestMaxWriteTimeoutPerRequest(t *testing.T) {

select {
case err := <-ch:
if err == nil || err != nil && !strings.EqualFold(err.Error(), "timeout") {
if err == nil || !strings.EqualFold(err.Error(), "timeout") {
t.Fatalf("Unexpected error from serveConn: %v", err)
}
case <-time.After(time.Second):
Expand Down
Loading