Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

Commit c2c86d5

Browse files
[Scheduled] Update dependencies (#212)
Dependencies updated Note - If you see this PR and the checks haven't run, close and reopen the PR. See https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs --------- Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com> Co-authored-by: David Barroso <dbarrosop@dravetech.com>
1 parent 1417ea7 commit c2c86d5

381 files changed

Lines changed: 19689 additions & 10352 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.golangci.yaml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,11 @@ linters:
66
- gomoddirectives
77
- nlreturn
88
- wsl
9-
- exhaustivestruct
10-
- maligned # deprecated
11-
- scopelint # deprecated
12-
- interfacer # deprecated
13-
- golint # deprecated
14-
- varcheck # deprecated
15-
- ifshort # deprecated
16-
- deadcode # deprecated
17-
- nosnakecase # deprecated
18-
- structcheck # deprecated
199
- usestdlibvars # needs to be fixed
2010
- exhaustruct # needs to be fixed
2111
- depguard
12+
- gomnd
13+
- execinquery
2214

2315
issues:
2416
exclude-rules:

clamd/clamd.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func sendCommand(conn net.Conn, command string) error {
4949
}
5050

5151
func readResponse(conn net.Conn) ([]byte, error) {
52-
buf := make([]byte, 1024) //nolint:gomnd
52+
buf := make([]byte, 1024) //nolint:mnd
5353
n, err := conn.Read(buf)
5454
if err != nil {
5555
return nil, fmt.Errorf("failed to read response: %w", err)
@@ -60,9 +60,9 @@ func readResponse(conn net.Conn) ([]byte, error) {
6060
func sendChunk(conn net.Conn, data []byte) error {
6161
var buf [4]byte
6262
lenData := len(data)
63-
buf[0] = byte(lenData >> 24) //nolint:gomnd
64-
buf[1] = byte(lenData >> 16) //nolint:gomnd
65-
buf[2] = byte(lenData >> 8) //nolint:gomnd
63+
buf[0] = byte(lenData >> 24) //nolint:mnd
64+
buf[1] = byte(lenData >> 16) //nolint:mnd
65+
buf[2] = byte(lenData >> 8) //nolint:mnd
6666
buf[3] = byte(lenData >> 0)
6767

6868
a := buf

clamd/instream_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ func TestClamdInstream(t *testing.T) {
3030
}
3131

3232
for _, tc := range cases {
33-
tc := tc
3433
t.Run(tc.name, func(t *testing.T) {
3534
t.Parallel()
3635

clamd/ping_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ func TestClamdPing(t *testing.T) {
1818
}
1919

2020
for _, tc := range cases {
21-
tc := tc
2221
t.Run(tc.name, func(t *testing.T) {
2322
t.Parallel()
2423

clamd/reload_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ func TestClamdReload(t *testing.T) {
1818
}
1919

2020
for _, tc := range cases {
21-
tc := tc
2221
t.Run(tc.name, func(t *testing.T) {
2322
t.Parallel()
2423

clamd/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ type Version struct {
1010
}
1111

1212
func parseVersion(response []byte) (Version, error) {
13-
parts := strings.SplitN(string(response), " ", 2) //nolint:gomnd
13+
parts := strings.SplitN(string(response), " ", 2) //nolint:mnd
1414
return Version{
1515
Version: parts[1],
1616
}, nil

clamd/version_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ func TestClamdVersion(t *testing.T) {
2222
}
2323

2424
for _, tc := range cases {
25-
tc := tc
2625
t.Run(tc.name, func(t *testing.T) {
2726
t.Parallel()
2827

client/delete_file.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ func (c *Client) DeleteFile(
1616
req, err := http.NewRequestWithContext(
1717
ctx,
1818
"DELETE",
19-
c.baseURL+"/files/"+fileID, //nolint:goconst
19+
c.baseURL+"/files/"+fileID,
2020
nil,
2121
)
2222
if err != nil {
2323
return fmt.Errorf("problem creating request: %w", err)
2424
}
25-
req.Header.Set("Authorization", "Bearer "+c.jwt) //nolint:goconst
25+
req.Header.Set("Authorization", "Bearer "+c.jwt)
2626

2727
resp, err := c.httpClient.Do(req)
2828
if err != nil {

client/delete_file_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,7 @@ func TestDeleteFile(t *testing.T) {
6464
}
6565

6666
for _, tc := range cases {
67-
tc := tc
6867
t.Run(tc.name, func(t *testing.T) {
69-
tc := tc
70-
7168
err := cl.DeleteFile(context.Background(), tc.fileID)
7269

7370
if !cmp.Equal(err, tc.expectedErr) {

client/get_file_information.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,28 +65,28 @@ func WithRange(rangeV string) GetFileInformationOpt {
6565
func WithIfMatch(etags ...string) GetFileInformationOpt {
6666
return func(req *http.Request) {
6767
for _, e := range etags {
68-
req.Header.Add("if-match", e)
68+
req.Header.Add("If-Match", e)
6969
}
7070
}
7171
}
7272

7373
func WithNoneMatch(etags ...string) GetFileInformationOpt {
7474
return func(req *http.Request) {
7575
for _, e := range etags {
76-
req.Header.Add("if-none-match", e)
76+
req.Header.Add("If-None-Match", e)
7777
}
7878
}
7979
}
8080

8181
func WithIfModifiedSince(modifiedSince string) GetFileInformationOpt {
8282
return func(req *http.Request) {
83-
req.Header.Add("if-modified-since", modifiedSince)
83+
req.Header.Add("If-Modified-Since", modifiedSince)
8484
}
8585
}
8686

8787
func WithIfUnmodifiedSince(modifiedSince string) GetFileInformationOpt {
8888
return func(req *http.Request) {
89-
req.Header.Add("if-unmodified-since", modifiedSince)
89+
req.Header.Add("If-Unmodified-Since", modifiedSince)
9090
}
9191
}
9292

0 commit comments

Comments
 (0)