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:
66
66
rules :
67
67
main :
68
68
deny :
69
- - pkg : " sync/atomic"
70
- desc : " Use go.uber.org/atomic instead of sync/atomic"
71
69
- pkg : " github.com/go-kit/kit/log"
72
70
desc : " Use github.com/go-kit/log instead of github.com/go-kit/kit/log"
73
71
- pkg : " io/ioutil"
Original file line number Diff line number Diff line change @@ -31,11 +31,11 @@ import (
31
31
"strconv"
32
32
"strings"
33
33
"sync"
34
+ "sync/atomic"
34
35
"testing"
35
36
"time"
36
37
37
38
"github.com/stretchr/testify/require"
38
- "go.uber.org/atomic"
39
39
"go.yaml.in/yaml/v2"
40
40
)
41
41
@@ -1309,8 +1309,7 @@ func TestTLSRoundTripperRaces(t *testing.T) {
1309
1309
1310
1310
var wg sync.WaitGroup
1311
1311
ch := make (chan struct {})
1312
- total := atomic .NewInt64 (0 )
1313
- ok := atomic .NewInt64 (0 )
1312
+ var total , ok int64
1314
1313
// Spawn 10 Go routines polling the server concurrently.
1315
1314
for i := 0 ; i < 10 ; i ++ {
1316
1315
wg .Add (1 )
@@ -1321,11 +1320,11 @@ func TestTLSRoundTripperRaces(t *testing.T) {
1321
1320
case <- ch :
1322
1321
return
1323
1322
default :
1324
- total . Add ( 1 )
1323
+ atomic . AddInt64 ( & total , 1 )
1325
1324
r , err := c .Get (testServer .URL )
1326
1325
if err == nil {
1327
1326
r .Body .Close ()
1328
- ok . Add ( 1 )
1327
+ atomic . AddInt64 ( & ok , 1 )
1329
1328
}
1330
1329
}
1331
1330
}
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ require (
12
12
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f
13
13
github.com/prometheus/client_model v0.6.2
14
14
github.com/stretchr/testify v1.11.1
15
- go.uber.org/atomic v1.11.0
16
15
go.yaml.in/yaml/v2 v2.4.2
17
16
golang.org/x/net v0.43.0
18
17
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
43
43
github.com/stretchr/testify v1.11.1 /go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U =
44
44
github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc =
45
45
github.com/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 =
48
46
go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI =
49
47
go.yaml.in/yaml/v2 v2.4.2 /go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU =
50
48
golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE =
You can’t perform that action at this time.
0 commit comments