Skip to content

Commit 0def27c

Browse files
authored
Migrate to go 1.25.0 in go.mod, update all deps (#172)
* Migrate to go 1.25.0 in go.mod * Bump golangci-lint to v2.5.0 and update related references * Update test command to conditionally include coverage for Go 1.25
1 parent 8099f34 commit 0def27c

File tree

8 files changed

+166
-176
lines changed

8 files changed

+166
-176
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ jobs:
2323
- name: golangci-lint
2424
uses: golangci/golangci-lint-action@v8
2525
with:
26-
version: "v2.3.1"
26+
version: "v2.5.0"

.github/workflows/tests.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,14 @@ jobs:
8282
MEMCACHED_ADDR: '127.0.0.1:11211'
8383
POSTGRES_URL: postgres://postgres:postgres@localhost:5432/?sslmode=disable
8484
COSMOS_ADDR: '127.0.0.1:8081'
85-
run: go test -race -v -coverprofile=coverage.txt -covermode=atomic ./...
85+
run: |
86+
if [ "${{ matrix.go-version }}" = "1.25" ]; then
87+
go test -race -coverprofile=coverage.txt -covermode=atomic ./...
88+
else
89+
go test -race ./...
90+
fi
8691
- uses: codecov/codecov-action@v5
92+
if: matrix.go-version == '1.25'
8793
with:
8894
verbose: true
95+

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ benchmark: docker-compose-up
1010
ETCD_ENDPOINTS="127.0.0.1:2379" REDIS_ADDR="127.0.0.1:6379" REDIS_NODES="127.0.0.1:11000,127.0.0.1:11001,127.0.0.1:11002,127.0.0.1:11003,127.0.0.1:11004,127.0.0.1:11005" ZOOKEEPER_ENDPOINTS="127.0.0.1" CONSUL_ADDR="127.0.0.1:8500" AWS_ADDR="127.0.0.1:8000" MEMCACHED_ADDR="127.0.0.1:11211" POSTGRES_URL="postgres://postgres:postgres@localhost:5432/?sslmode=disable" COSMOS_ADDR="127.0.0.1:8081" go test -race -run=nonexistent -bench=.
1111

1212
lint:
13-
@(which golangci-lint && golangci-lint --version | grep 2.3.1) || (curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/v2.3.1/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v2.3.1)
13+
@(which golangci-lint && golangci-lint --version | grep 2.5.0) || (curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/v2.5.0/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v2.5.0)
1414
golangci-lint run --fix ./...
1515

1616
goimports:

examples/example_grpc_simple_limiter_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Package examples implements a gRPC server for Greeter service using rate limiters.
21
package examples_test
32

43
import (

examples/gprc_service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const (
1010
Port = ":50051"
1111
)
1212

13-
// server is used to implement helloworld.GreeterServer.
13+
// Server is used to implement helloworld.GreeterServer.
1414
type Server struct {
1515
pb.UnimplementedGreeterServer
1616
}

fixedwindow.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ var fixedWindowDynamoDBPartitionKey contextKey
237237
//
238238
// This context can be used to control the partition key per-request.
239239
//
240-
// DEPRECATED: NewFixedWindowDynamoDBContext is deprecated and will be removed in future versions.
240+
// Deprecated: NewFixedWindowDynamoDBContext is deprecated and will be removed in future versions.
241241
// Separate FixedWindow rate limiters should be used for different partition keys instead.
242242
// Consider using the `Registry` to manage multiple FixedWindow instances with different partition keys.
243243
func NewFixedWindowDynamoDBContext(ctx context.Context, partitionKey string) context.Context {

go.mod

Lines changed: 38 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,79 @@
11
module github.com/mennanov/limiters
22

3-
go 1.24
4-
5-
replace github.com/armon/go-metrics => github.com/hashicorp/go-metrics v0.4.1
3+
go 1.25.0
64

75
require (
8-
github.com/aws/aws-sdk-go-v2/config v1.29.12
9-
github.com/aws/aws-sdk-go-v2/credentials v1.18.11
6+
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.19.1
7+
github.com/Azure/azure-sdk-for-go/sdk/data/azcosmos v1.4.1
8+
github.com/alessandro-c/gomemcached-lock v1.0.0
9+
github.com/aws/aws-sdk-go-v2 v1.39.2
10+
github.com/aws/aws-sdk-go-v2/config v1.31.12
11+
github.com/aws/aws-sdk-go-v2/credentials v1.18.16
1012
github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.20.13
13+
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.50.5
14+
github.com/bradfitz/gomemcache v0.0.0-20250403215159-8d39553ac7cf
15+
github.com/cenkalti/backoff/v3 v3.2.2
1116
github.com/go-redsync/redsync/v4 v4.13.0
1217
github.com/google/uuid v1.6.0
13-
github.com/hashicorp/consul/api v1.32.1
18+
github.com/hashicorp/consul/api v1.32.4
19+
github.com/lib/pq v1.10.9
1420
github.com/pkg/errors v0.9.1
1521
github.com/redis/go-redis/v9 v9.14.0
1622
github.com/samuel/go-zookeeper v0.0.0-20201211165307-7117e9ea2414
17-
github.com/stretchr/testify v1.10.0
23+
github.com/stretchr/testify v1.11.1
1824
go.etcd.io/etcd/api/v3 v3.6.5
1925
go.etcd.io/etcd/client/v3 v3.6.5
2026
google.golang.org/grpc v1.75.1
21-
google.golang.org/protobuf v1.36.6
22-
)
23-
24-
require (
25-
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.0
26-
github.com/Azure/azure-sdk-for-go/sdk/data/azcosmos v1.4.0
27-
github.com/aws/aws-sdk-go-v2 v1.39.2
28-
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.50.5
29-
github.com/cenkalti/backoff/v3 v3.2.2
30-
github.com/lib/pq v1.10.9
27+
google.golang.org/protobuf v1.36.9
3128
)
3229

3330
require (
3431
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible // indirect
35-
github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 // indirect
36-
github.com/armon/go-metrics v0.5.4 // indirect
37-
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.7 // indirect
32+
github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 // indirect
33+
github.com/armon/go-metrics v0.4.1 // indirect
34+
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.9 // indirect
3835
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.9 // indirect
3936
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.9 // indirect
4037
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect
4138
github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.31.0 // indirect
4239
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 // indirect
4340
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.9 // indirect
44-
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.7 // indirect
45-
github.com/aws/aws-sdk-go-v2/service/sso v1.29.2 // indirect
46-
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.34.3 // indirect
47-
github.com/aws/aws-sdk-go-v2/service/sts v1.38.3 // indirect
41+
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.9 // indirect
42+
github.com/aws/aws-sdk-go-v2/service/sso v1.29.6 // indirect
43+
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.1 // indirect
44+
github.com/aws/aws-sdk-go-v2/service/sts v1.38.6 // indirect
4845
github.com/aws/smithy-go v1.23.0 // indirect
4946
github.com/cespare/xxhash/v2 v2.3.0 // indirect
47+
github.com/coreos/go-semver v0.3.1 // indirect
48+
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
5049
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
5150
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
51+
github.com/fatih/color v1.16.0 // indirect
52+
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
5253
github.com/gogo/protobuf v1.3.2 // indirect
5354
github.com/golang/protobuf v1.5.4 // indirect
5455
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect
5556
github.com/hashicorp/errwrap v1.1.0 // indirect
56-
github.com/hashicorp/go-metrics v0.5.4 // indirect
57+
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
58+
github.com/hashicorp/go-hclog v1.5.0 // indirect
59+
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
5760
github.com/hashicorp/go-multierror v1.1.1 // indirect
5861
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
59-
github.com/hashicorp/golang-lru v1.0.2 // indirect
60-
github.com/hashicorp/serf v0.10.2 // indirect
61-
github.com/mattn/go-colorable v0.1.14 // indirect
62+
github.com/hashicorp/golang-lru v0.5.4 // indirect
63+
github.com/hashicorp/serf v0.10.1 // indirect
64+
github.com/mattn/go-colorable v0.1.13 // indirect
6265
github.com/mattn/go-isatty v0.0.20 // indirect
6366
github.com/mitchellh/go-homedir v1.1.0 // indirect
6467
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
65-
github.com/thanhpk/randstr v1.0.6 // indirect
68+
github.com/thanhpk/randstr v1.0.4 // indirect
6669
go.etcd.io/etcd/client/pkg/v3 v3.6.5 // indirect
67-
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 // indirect
68-
golang.org/x/sys v0.33.0 // indirect
69-
golang.org/x/text v0.26.0 // indirect
70+
go.uber.org/multierr v1.11.0 // indirect
71+
go.uber.org/zap v1.27.0 // indirect
72+
golang.org/x/exp v0.0.0-20250808145144-a408d31f581a // indirect
73+
golang.org/x/net v0.43.0 // indirect
74+
golang.org/x/sys v0.35.0 // indirect
75+
golang.org/x/text v0.28.0 // indirect
7076
google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7 // indirect
7177
google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7 // indirect
7278
gopkg.in/yaml.v3 v3.0.1 // indirect
7379
)
74-
75-
require (
76-
github.com/alessandro-c/gomemcached-lock v1.0.0
77-
github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874
78-
github.com/coreos/go-semver v0.3.1 // indirect
79-
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
80-
github.com/fatih/color v1.18.0 // indirect
81-
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
82-
github.com/hashicorp/go-hclog v1.6.3 // indirect
83-
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
84-
github.com/mitchellh/mapstructure v1.5.0 // indirect
85-
go.uber.org/multierr v1.11.0 // indirect
86-
go.uber.org/zap v1.27.0 // indirect
87-
golang.org/x/net v0.41.0 // indirect
88-
)

0 commit comments

Comments
 (0)