Skip to content

Commit bec7f31

Browse files
authored
Fixes some linter errors to fix workflow error (#602)
* Fixes some linter errors * Try latest version and SHA
1 parent 7feb70f commit bec7f31

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/workflows/analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ jobs:
2121
fetch-depth: 0
2222

2323
- name: golangci-lint
24-
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8
24+
uses: golangci/golangci-lint-action@eab1d2f3d76f26c09e2ab8c957fe5bb64bf46b89
2525
with:
26-
version: v1.56.2
26+
version: v1.62.2
2727

2828
- name: shellcheck
2929
uses: azohra/shell-linter@6bbeaa868df09c34ddc008e6030cfe89c03394a1

link_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ func TestNoDataDropped(t *testing.T) {
157157
done := make(chan struct{})
158158
defer close(done)
159159
go func() {
160-
for i := 0; i < 64*1024; i++ {
160+
for i := uint16(0); i < 65535; i++ {
161161
buf := make([]byte, 2)
162-
binary.BigEndian.PutUint16(buf, uint16(i))
162+
binary.BigEndian.PutUint16(buf, i)
163163
link.input.Write(buf)
164164
}
165165
link.input.Close()
@@ -177,13 +177,13 @@ func TestNoDataDropped(t *testing.T) {
177177
}(ctx)
178178

179179
buf := make([]byte, 2)
180-
for i := 0; i < 64*1024; i++ {
180+
for i := uint16(0); i < 65535; i++ {
181181
n, err := link.output.Read(buf)
182182
if n != 2 || err != nil {
183183
t.Fatalf("Read failed: %d %v", n, err)
184184
} else {
185185
val := binary.BigEndian.Uint16(buf)
186-
if val != uint16(i) {
186+
if val != i {
187187
t.Fatalf("Read incorrect bytes: %v != %d", val, i)
188188
}
189189
}

0 commit comments

Comments
 (0)