Skip to content

Commit

Permalink
ci: update versions in workflows (#32)
Browse files Browse the repository at this point in the history
* ci: update versions in workflows

* fix unused-parameter linter warnings in tests
  • Loading branch information
reugn authored Feb 16, 2024
1 parent 6b4efc0 commit 8eee5b9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.20.x, 1.21.x]
go-version: [1.20.x, 1.22.x]
steps:
- name: Setup Go
uses: actions/setup-go@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
uses: actions/checkout@v4

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v4
6 changes: 3 additions & 3 deletions future_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ func TestFutureRecover(t *testing.T) {
time.Sleep(10 * time.Millisecond)
p2.Failure(errors.New("recover Future failure"))
}()
future := p1.Future().Map(func(v *int) (*int, error) {
future := p1.Future().Map(func(_ *int) (*int, error) {
return nil, errors.New("map error")
}).FlatMap(func(v *int) (Future[int], error) {
}).FlatMap(func(_ *int) (Future[int], error) {
p2 := NewPromise[int]()
p2.Failure(errors.New("flatMap Future failure"))
return p2.Future(), nil
}).FlatMap(func(v *int) (Future[int], error) {
}).FlatMap(func(_ *int) (Future[int], error) {
return nil, errors.New("flatMap error")
}).Recover(func() (*int, error) {
return nil, errors.New("recover error")
Expand Down
4 changes: 2 additions & 2 deletions map_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,14 @@ func TestShardedMap_ConstructorArguments(t *testing.T) {
}, "nonpositive shards")

assert.PanicMsgContains(t, func() {
NewShardedMapWithHash[int, string](0, func(i int) uint64 { return 1 })
NewShardedMapWithHash[int, string](0, func(_ int) uint64 { return 1 })
}, "nonpositive shards")

assert.PanicMsgContains(t, func() {
NewShardedMapWithHash[int, string](2, nil)
}, "hashFunc is nil")

NewShardedMapWithHash[int, string](2, func(i int) uint64 { return 1 })
NewShardedMapWithHash[int, string](2, func(_ int) uint64 { return 1 })
}

func TestConcurrentMap_MemoryLeaks(t *testing.T) {
Expand Down

0 comments on commit 8eee5b9

Please sign in to comment.