Skip to content

Commit

Permalink
refactor: make golangci-lint v1.52.2 happy
Browse files Browse the repository at this point in the history
Except for stupid report about "unused-parameter".

Signed-off-by: Maxime Soulé <btik-git@scoubidou.com>
  • Loading branch information
maxatome committed Apr 21, 2023
1 parent 507a05e commit 1a2d6be
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ jobs:
if: matrix.full-tests
run: |
curl -sL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh |
sh -s -- -b $HOME/go/bin v1.51.0
sh -s -- -b $HOME/go/bin v1.52.2
$HOME/go/bin/golangci-lint run --max-issues-per-linter 0 \
--max-same-issues 0 \
--exclude="unused-parameter: parameter '[^']+' seems to be unused, consider removing or renaming it as _" \
-E asciicheck \
-E bidichk \
-E durationcheck \
-E exportloopref \
-E gocritic \
-E godot \
Expand Down
9 changes: 8 additions & 1 deletion race_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,20 @@ package httpmock_test

import (
"net/http"
"sync"
"testing"

. "github.com/jarcoal/httpmock"
)

func TestActivateNonDefaultRace(t *testing.T) {
var wg sync.WaitGroup
wg.Add(10)
for i := 0; i < 10; i++ {
go ActivateNonDefault(&http.Client{})
go func() {
defer wg.Done()
ActivateNonDefault(&http.Client{})
}()
}
wg.Wait()
}

0 comments on commit 1a2d6be

Please sign in to comment.