File tree Expand file tree Collapse file tree 4 files changed +4
-10
lines changed
Expand file tree Collapse file tree 4 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -66,8 +66,6 @@ linters:
6666 rules :
6767 main :
6868 deny :
69- - pkg : " sync/atomic"
70- desc : " Use go.uber.org/atomic instead of sync/atomic"
7169 - pkg : " github.com/go-kit/kit/log"
7270 desc : " Use github.com/go-kit/log instead of github.com/go-kit/kit/log"
7371 - pkg : " io/ioutil"
Original file line number Diff line number Diff line change @@ -31,11 +31,11 @@ import (
3131 "strconv"
3232 "strings"
3333 "sync"
34+ "sync/atomic"
3435 "testing"
3536 "time"
3637
3738 "github.com/stretchr/testify/require"
38- "go.uber.org/atomic"
3939 "go.yaml.in/yaml/v2"
4040)
4141
@@ -1309,8 +1309,7 @@ func TestTLSRoundTripperRaces(t *testing.T) {
13091309
13101310 var wg sync.WaitGroup
13111311 ch := make (chan struct {})
1312- total := atomic .NewInt64 (0 )
1313- ok := atomic .NewInt64 (0 )
1312+ var total , ok int64
13141313 // Spawn 10 Go routines polling the server concurrently.
13151314 for i := 0 ; i < 10 ; i ++ {
13161315 wg .Add (1 )
@@ -1321,11 +1320,11 @@ func TestTLSRoundTripperRaces(t *testing.T) {
13211320 case <- ch :
13221321 return
13231322 default :
1324- total . Add ( 1 )
1323+ atomic . AddInt64 ( & total , 1 )
13251324 r , err := c .Get (testServer .URL )
13261325 if err == nil {
13271326 r .Body .Close ()
1328- ok . Add ( 1 )
1327+ atomic . AddInt64 ( & ok , 1 )
13291328 }
13301329 }
13311330 }
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ require (
1212 github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f
1313 github.com/prometheus/client_model v0.6.2
1414 github.com/stretchr/testify v1.11.1
15- go.uber.org/atomic v1.11.0
1615 go.yaml.in/yaml/v2 v2.4.2
1716 golang.org/x/net v0.43.0
1817 golang.org/x/oauth2 v0.30.0
Original file line number Diff line number Diff line change @@ -43,8 +43,6 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu
4343mygithub.libinneed.workers.dev/stretchr/testify v1.11.1 /go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U =
4444mygithub.libinneed.workers.dev/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc =
4545mygithub.libinneed.workers.dev/xhit/go-str2duration/v2 v2.1.0 /go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU =
46- go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE =
47- go.uber.org/atomic v1.11.0 /go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0 =
4846go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI =
4947go.yaml.in/yaml/v2 v2.4.2 /go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU =
5048golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE =
You can’t perform that action at this time.
0 commit comments