Skip to content

Commit

Permalink
Fixes some linter errors to fix workflow error (#602)
Browse files Browse the repository at this point in the history
* Fixes some linter errors

* Try latest version and SHA
  • Loading branch information
iyaz-shaikh authored Nov 26, 2024
1 parent 7feb70f commit bec7f31
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
fetch-depth: 0

- name: golangci-lint
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8
uses: golangci/golangci-lint-action@eab1d2f3d76f26c09e2ab8c957fe5bb64bf46b89
with:
version: v1.56.2
version: v1.62.2

- name: shellcheck
uses: azohra/shell-linter@6bbeaa868df09c34ddc008e6030cfe89c03394a1
Expand Down
8 changes: 4 additions & 4 deletions link_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ func TestNoDataDropped(t *testing.T) {
done := make(chan struct{})
defer close(done)
go func() {
for i := 0; i < 64*1024; i++ {
for i := uint16(0); i < 65535; i++ {
buf := make([]byte, 2)
binary.BigEndian.PutUint16(buf, uint16(i))
binary.BigEndian.PutUint16(buf, i)
link.input.Write(buf)
}
link.input.Close()
Expand All @@ -177,13 +177,13 @@ func TestNoDataDropped(t *testing.T) {
}(ctx)

buf := make([]byte, 2)
for i := 0; i < 64*1024; i++ {
for i := uint16(0); i < 65535; i++ {
n, err := link.output.Read(buf)
if n != 2 || err != nil {
t.Fatalf("Read failed: %d %v", n, err)
} else {
val := binary.BigEndian.Uint16(buf)
if val != uint16(i) {
if val != i {
t.Fatalf("Read incorrect bytes: %v != %d", val, i)
}
}
Expand Down

0 comments on commit bec7f31

Please sign in to comment.