Skip to content

Commit aeb2fb4

Browse files
authored
Upgrade Go version to 1.22 in go.mod and workflows (#29)
* Upgrade Go version to 1.22 in go.mod and workflows I updated `go.mod` to use 1.22 and ran the following to get these changes: ```sh go mod tidy go mod vendor ``` There are still other parts of the repo that are using an older version of Go (like in the Dockerfiles), but I'll update those in a different PR since this change is already kind of large. Signed-off-by: Charlie Le <[email protected]> * Update usage golangci Following instructions from https://github.com/golangci/golangci-lint-action Signed-off-by: Charlie Le <[email protected]> * Deprecate use of ioutil package Signed-off-by: Charlie Le <[email protected]> * Remove unused parameters Signed-off-by: Charlie Le <[email protected]> --------- Signed-off-by: Charlie Le <[email protected]>
1 parent 88f0a63 commit aeb2fb4

File tree

225 files changed

+427
-7865
lines changed

Some content is hidden

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

225 files changed

+427
-7865
lines changed

.github/workflows/validate_pr.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,34 +9,32 @@ jobs:
99
name: Lint
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
13-
- name: Set up Go 1.16
14-
uses: actions/setup-go@v1
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-go@v5
1514
with:
16-
go-version: 1.16
15+
go-version: 1.22
16+
cache: false
1717
- name: golangci-lint
18-
uses: golangci/golangci-lint-action@v3
18+
uses: golangci/golangci-lint-action@v4
1919
with:
20-
version: v1.53
20+
version: v1.54
2121
unit_tests:
2222
name: Unit-Tests
2323
runs-on: ubuntu-latest
2424
steps:
25-
- uses: actions/checkout@v2
26-
- name: Set up Go 1.16
27-
uses: actions/setup-go@v1
25+
- uses: actions/checkout@v4
26+
- uses: actions/setup-go@v5
2827
with:
29-
go-version: 1.16
28+
go-version: 1.22
3029
- name: Unit Tests
3130
run: make test
3231
build:
3332
name: Build Binaries
3433
runs-on: ubuntu-latest
3534
steps:
36-
- uses: actions/checkout@v2
37-
- name: Set up Go 1.16
38-
uses: actions/setup-go@v1
35+
- uses: actions/checkout@v4
36+
- uses: actions/setup-go@v5
3937
with:
40-
go-version: 1.16
38+
go-version: 1.22
4139
- name: Build All
4240
run: make all

cmd/cortextool/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func main() {
3838
analyseCommand.Register(app)
3939
bucketValidateCommand.Register(app)
4040

41-
app.Command("version", "Get the version of the cortextool CLI").Action(func(k *kingpin.ParseContext) error {
41+
app.Command("version", "Get the version of the cortextool CLI").Action(func(_ *kingpin.ParseContext) error {
4242
fmt.Print(version.Template)
4343
version.CheckLatest()
4444

cmd/rules-migrator/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"encoding/base64"
77
"flag"
88
"fmt"
9-
"io/ioutil"
9+
"io"
1010
"log"
1111
"strings"
1212

@@ -75,7 +75,7 @@ func main() {
7575
log.Fatalf("unable to load object, %v", err)
7676
}
7777

78-
data, err := ioutil.ReadAll(reader)
78+
data, err := io.ReadAll(reader)
7979
if err != nil {
8080
log.Fatalf("unable to read object, %v", err)
8181
}

go.mod

Lines changed: 176 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,17 @@
11
module github.com/cortexproject/cortex-tools
22

3-
go 1.16
3+
go 1.22
44

55
require (
66
cloud.google.com/go/bigtable v1.3.0
77
cloud.google.com/go/storage v1.10.0
88
github.com/alecthomas/chroma v0.7.0
9-
github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1 // indirect
109
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137
1110
github.com/cortexproject/cortex v1.13.2
12-
github.com/dlclark/regexp2 v1.2.0 // indirect
1311
github.com/go-kit/log v0.2.0
1412
github.com/gocql/gocql v0.0.0-20200526081602-cd04bd7f22a7
1513
github.com/gogo/protobuf v1.3.2
1614
github.com/golang/snappy v0.0.4
17-
github.com/gonum/blas v0.0.0-20181208220705-f22b278b28ac // indirect
18-
github.com/gonum/floats v0.0.0-20181209220543-c233463c7e82 // indirect
19-
github.com/gonum/integrate v0.0.0-20181209220457-a422b5c0fdf2 // indirect
20-
github.com/gonum/internal v0.0.0-20181124074243-f884aa714029 // indirect
21-
github.com/gonum/lapack v0.0.0-20181123203213-e4cdc5a0bff9 // indirect
22-
github.com/gonum/matrix v0.0.0-20181209220409-c518dec07be9 // indirect
2315
github.com/gonum/stat v0.0.0-20181125101827-41a0da705a5b
2416
github.com/google/go-github/v32 v32.1.0
2517
github.com/gorilla/mux v1.8.0
@@ -48,6 +40,181 @@ require (
4840
gotest.tools v2.2.0+incompatible
4941
)
5042

43+
require (
44+
cloud.google.com/go v0.100.2 // indirect
45+
cloud.google.com/go/compute v1.5.0 // indirect
46+
cloud.google.com/go/iam v0.3.0 // indirect
47+
github.com/Azure/azure-pipeline-go v0.2.3 // indirect
48+
github.com/Azure/azure-storage-blob-go v0.13.0 // indirect
49+
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
50+
github.com/Azure/go-autorest/autorest v0.11.25 // indirect
51+
github.com/Azure/go-autorest/autorest/adal v0.9.18 // indirect
52+
github.com/Azure/go-autorest/autorest/azure/auth v0.5.8 // indirect
53+
github.com/Azure/go-autorest/autorest/azure/cli v0.4.2 // indirect
54+
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
55+
github.com/Azure/go-autorest/logger v0.2.1 // indirect
56+
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
57+
github.com/Masterminds/squirrel v0.0.0-20161115235646-20f192218cf5 // indirect
58+
github.com/NYTimes/gziphandler v1.1.1 // indirect
59+
github.com/PuerkitoBio/purell v1.1.1 // indirect
60+
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
61+
github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1 // indirect
62+
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
63+
github.com/armon/go-metrics v0.3.9 // indirect
64+
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect
65+
github.com/aws/aws-sdk-go v1.43.31 // indirect
66+
github.com/beorn7/perks v1.0.1 // indirect
67+
github.com/blang/semver/v4 v4.0.0 // indirect
68+
github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b // indirect
69+
github.com/cenkalti/backoff/v4 v4.1.2 // indirect
70+
github.com/cespare/xxhash v1.1.0 // indirect
71+
github.com/cespare/xxhash/v2 v2.1.2 // indirect
72+
github.com/coreos/go-semver v0.3.0 // indirect
73+
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
74+
github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 // indirect
75+
github.com/davecgh/go-spew v1.1.1 // indirect
76+
github.com/dennwc/varint v1.0.0 // indirect
77+
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
78+
github.com/dimchansky/utfbom v1.1.1 // indirect
79+
github.com/dlclark/regexp2 v1.2.0 // indirect
80+
github.com/docker/go-units v0.4.0 // indirect
81+
github.com/dustin/go-humanize v1.0.0 // indirect
82+
github.com/edsrzf/mmap-go v1.1.0 // indirect
83+
github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb // indirect
84+
github.com/fatih/color v1.13.0 // indirect
85+
github.com/felixge/fgprof v0.9.1 // indirect
86+
github.com/felixge/httpsnoop v1.0.2 // indirect
87+
github.com/fsnotify/fsnotify v1.5.1 // indirect
88+
github.com/fsouza/fake-gcs-server v1.7.0 // indirect
89+
github.com/go-kit/kit v0.12.0 // indirect
90+
github.com/go-logfmt/logfmt v0.5.1 // indirect
91+
github.com/go-logr/logr v1.2.3 // indirect
92+
github.com/go-logr/stdr v1.2.2 // indirect
93+
github.com/go-openapi/analysis v0.21.2 // indirect
94+
github.com/go-openapi/errors v0.20.2 // indirect
95+
github.com/go-openapi/jsonpointer v0.19.5 // indirect
96+
github.com/go-openapi/jsonreference v0.19.6 // indirect
97+
github.com/go-openapi/loads v0.21.1 // indirect
98+
github.com/go-openapi/runtime v0.23.1 // indirect
99+
github.com/go-openapi/spec v0.20.4 // indirect
100+
github.com/go-openapi/strfmt v0.21.2 // indirect
101+
github.com/go-openapi/swag v0.21.1 // indirect
102+
github.com/go-openapi/validate v0.21.0 // indirect
103+
github.com/go-redis/redis/v8 v8.11.4 // indirect
104+
github.com/go-stack/stack v1.8.1 // indirect
105+
github.com/gofrs/uuid v4.2.0+incompatible // indirect
106+
github.com/gogo/googleapis v1.4.0 // indirect
107+
github.com/gogo/status v1.1.0 // indirect
108+
github.com/golang-jwt/jwt/v4 v4.2.0 // indirect
109+
github.com/golang-migrate/migrate/v4 v4.7.0 // indirect
110+
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
111+
github.com/golang/protobuf v1.5.2 // indirect
112+
github.com/gonum/blas v0.0.0-20181208220705-f22b278b28ac // indirect
113+
github.com/gonum/floats v0.0.0-20181209220543-c233463c7e82 // indirect
114+
github.com/gonum/integrate v0.0.0-20181209220457-a422b5c0fdf2 // indirect
115+
github.com/gonum/internal v0.0.0-20181124074243-f884aa714029 // indirect
116+
github.com/gonum/lapack v0.0.0-20181123203213-e4cdc5a0bff9 // indirect
117+
github.com/gonum/matrix v0.0.0-20181209220409-c518dec07be9 // indirect
118+
github.com/google/btree v1.0.1 // indirect
119+
github.com/google/go-cmp v0.5.7 // indirect
120+
github.com/google/go-querystring v1.0.0 // indirect
121+
github.com/google/pprof v0.0.0-20220318212150-b2ab0324ddda // indirect
122+
github.com/google/uuid v1.2.0 // indirect
123+
github.com/googleapis/gax-go/v2 v2.2.0 // indirect
124+
github.com/gosimple/slug v1.1.1 // indirect
125+
github.com/grafana/regexp v0.0.0-20220304095617-2e8d9baf4ac2 // indirect
126+
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
127+
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2.0.20201207153454-9f6bf00c00a7 // indirect
128+
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect
129+
github.com/hashicorp/consul/api v1.12.0 // indirect
130+
github.com/hashicorp/errwrap v1.1.0 // indirect
131+
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
132+
github.com/hashicorp/go-hclog v0.16.2 // indirect
133+
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
134+
github.com/hashicorp/go-msgpack v0.5.5 // indirect
135+
github.com/hashicorp/go-multierror v1.1.1 // indirect
136+
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
137+
github.com/hashicorp/go-sockaddr v1.0.2 // indirect
138+
github.com/hashicorp/golang-lru v0.5.4 // indirect
139+
github.com/hashicorp/memberlist v0.3.1 // indirect
140+
github.com/hashicorp/serf v0.9.6 // indirect
141+
github.com/jessevdk/go-flags v1.5.0 // indirect
142+
github.com/jmespath/go-jmespath v0.4.0 // indirect
143+
github.com/josharian/intern v1.0.0 // indirect
144+
github.com/jpillora/backoff v1.0.0 // indirect
145+
github.com/json-iterator/go v1.1.12 // indirect
146+
github.com/julienschmidt/httprouter v1.3.0 // indirect
147+
github.com/klauspost/cpuid v1.3.1 // indirect
148+
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
149+
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
150+
github.com/lib/pq v1.3.0 // indirect
151+
github.com/mailru/easyjson v0.7.7 // indirect
152+
github.com/mattn/go-colorable v0.1.12 // indirect
153+
github.com/mattn/go-ieproxy v0.0.1 // indirect
154+
github.com/mattn/go-isatty v0.0.14 // indirect
155+
github.com/miekg/dns v1.1.48 // indirect
156+
github.com/minio/md5-simd v1.1.0 // indirect
157+
github.com/minio/minio-go/v7 v7.0.10 // indirect
158+
github.com/minio/sha256-simd v0.1.1 // indirect
159+
github.com/mitchellh/go-homedir v1.1.0 // indirect
160+
github.com/mitchellh/mapstructure v1.4.3 // indirect
161+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
162+
github.com/modern-go/reflect2 v1.0.2 // indirect
163+
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
164+
github.com/ncw/swift v1.0.52 // indirect
165+
github.com/oklog/run v1.1.0 // indirect
166+
github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e // indirect
167+
github.com/pmezard/go-difflib v1.0.0 // indirect
168+
github.com/prometheus/client_model v0.2.0 // indirect
169+
github.com/prometheus/common/sigv4 v0.1.0 // indirect
170+
github.com/prometheus/exporter-toolkit v0.7.1 // indirect
171+
github.com/prometheus/node_exporter v1.0.0-rc.0.0.20200428091818-01054558c289 // indirect
172+
github.com/prometheus/procfs v0.7.3 // indirect
173+
github.com/rainycape/unidecode v0.0.0-20150907023854-cb7f23ec59be // indirect
174+
github.com/rs/cors v1.8.2 // indirect
175+
github.com/rs/xid v1.2.1 // indirect
176+
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect
177+
github.com/segmentio/fasthash v0.0.0-20180216231524-a72b379d632e // indirect
178+
github.com/sercand/kuberesolver v2.4.0+incompatible // indirect
179+
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 // indirect
180+
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 // indirect
181+
github.com/sony/gobreaker v0.4.1 // indirect
182+
github.com/spf13/afero v1.6.0 // indirect
183+
github.com/stretchr/objx v0.2.0 // indirect
184+
github.com/uber/jaeger-client-go v2.29.1+incompatible // indirect
185+
github.com/uber/jaeger-lib v2.4.1+incompatible // indirect
186+
github.com/weaveworks/promrus v1.2.0 // indirect
187+
go.etcd.io/bbolt v1.3.6 // indirect
188+
go.etcd.io/etcd/api/v3 v3.5.4 // indirect
189+
go.etcd.io/etcd/client/pkg/v3 v3.5.4 // indirect
190+
go.etcd.io/etcd/client/v3 v3.5.4 // indirect
191+
go.mongodb.org/mongo-driver v1.8.3 // indirect
192+
go.opencensus.io v0.23.0 // indirect
193+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.31.0 // indirect
194+
go.opentelemetry.io/otel v1.6.1 // indirect
195+
go.opentelemetry.io/otel/metric v0.28.0 // indirect
196+
go.opentelemetry.io/otel/trace v1.6.1 // indirect
197+
go.uber.org/goleak v1.1.12 // indirect
198+
go.uber.org/multierr v1.7.0 // indirect
199+
go.uber.org/zap v1.19.1 // indirect
200+
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 // indirect
201+
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
202+
golang.org/x/net v0.0.0-20220325170049-de3da57026de // indirect
203+
golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a // indirect
204+
golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886 // indirect
205+
golang.org/x/text v0.3.7 // indirect
206+
golang.org/x/time v0.0.0-20220224211638-0e9765cccd65 // indirect
207+
golang.org/x/tools v0.1.10 // indirect
208+
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
209+
google.golang.org/appengine v1.6.7 // indirect
210+
google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb // indirect
211+
google.golang.org/grpc v1.45.0 // indirect
212+
google.golang.org/protobuf v1.28.0 // indirect
213+
gopkg.in/inf.v0 v0.9.1 // indirect
214+
gopkg.in/ini.v1 v1.57.0 // indirect
215+
rsc.io/binaryregexp v0.2.0 // indirect
216+
)
217+
51218
// Cortex Overrides
52219
replace git.apache.org/thrift.git => github.com/apache/thrift v0.0.0-20180902110319-2566ecd5d999
53220

go.sum

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngE
284284
github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA=
285285
github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84=
286286
github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
287-
github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ=
288287
github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
289288
github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=
290289
github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ=
@@ -304,7 +303,6 @@ github.com/cactus/go-statsd-client/statsd v0.0.0-20191106001114-12b4e2b38748/go.
304303
github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
305304
github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg=
306305
github.com/cenkalti/backoff v0.0.0-20181003080854-62661b46c409/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
307-
github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4=
308306
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
309307
github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
310308
github.com/cenkalti/backoff/v4 v4.1.2 h1:6Yo7N8UP2K6LWZnW94DLVSSrbobcWdVzAYOisuDPIFo=
@@ -476,7 +474,6 @@ github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee
476474
github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
477475
github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
478476
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
479-
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf h1:iW4rZ826su+pqaw19uhpSCzhj44qo35pNgKFGqzDKkU=
480477
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
481478
github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
482479
github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
@@ -878,7 +875,6 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69
878875
github.com/gogo/status v1.0.3/go.mod h1:SavQ51ycCLnc7dGyJxp8YAmudx8xqiVrRf+6IXRsugc=
879876
github.com/gogo/status v1.1.0 h1:+eIkrewn5q6b30y+g/BJINVVdi2xH7je5MPJ3ZPK3JA=
880877
github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM=
881-
github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c=
882878
github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
883879
github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
884880
github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU=
@@ -966,7 +962,6 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
966962
github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
967963
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
968964
github.com/google/go-containerregistry v0.5.1/go.mod h1:Ct15B4yir3PLOP5jsy0GNeYVaIZs/MK/Jz5any1wFW0=
969-
github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY=
970965
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
971966
github.com/google/go-github/v32 v32.1.0 h1:GWkQOdXqviCPx7Q7Fj+KyPoGm4SwHRh8rheoPhd27II=
972967
github.com/google/go-github/v32 v32.1.0/go.mod h1:rIEpZD9CTDQwDK9GDrtMTycQNA4JU3qBsCizh3q2WCI=
@@ -1007,7 +1002,6 @@ github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+
10071002
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
10081003
github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs=
10091004
github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
1010-
github.com/googleapis/gax-go v2.0.2+incompatible h1:silFMLAnr330+NRuag/VjIGF7TLp/LBrV2CJKFLWEww=
10111005
github.com/googleapis/gax-go v2.0.2+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY=
10121006
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
10131007
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
@@ -1856,7 +1850,6 @@ go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU=
18561850
go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4=
18571851
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
18581852
go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg=
1859-
go.etcd.io/etcd v3.3.25+incompatible h1:V1RzkZJj9LqsJRy+TUBgpWSbZXITLB819lstuTFoZOY=
18601853
go.etcd.io/etcd v3.3.25+incompatible/go.mod h1:yaeTdrJi5lOmYerz05bd8+V7KubZs8YSFZfzsF9A6aI=
18611854
go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=
18621855
go.etcd.io/etcd/api/v3 v3.5.4 h1:OHVyt3TopwtUQ2GKdd5wu3PmmipR4FTwCqoEjSyRdIc=
@@ -1897,7 +1890,6 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
18971890
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
18981891
go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=
18991892
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
1900-
go.opentelemetry.io/contrib v0.20.0 h1:ubFQUn0VCZ0gPwIoJfBJVpeBlyRMxu8Mm/huKWYd9p0=
19011893
go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc=
19021894
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E=
19031895
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.28.0/go.mod h1:vEhqr0m4eTc+DWxfsXoXue2GBgV2uUwVznkGIHW/e5w=

pkg/alerting/runner.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"context"
66
"flag"
77
"fmt"
8-
"io/ioutil"
8+
"os"
99
"sync"
1010
"time"
1111

@@ -111,7 +111,7 @@ func NewRunner(cfg RunnerConfig, logger log.Logger) (*Runner, error) {
111111

112112
var amConfig []byte
113113
if cfg.AlertmanagerConfigFile != "" {
114-
amConfig, err = ioutil.ReadFile(cfg.AlertmanagerConfigFile)
114+
amConfig, err = os.ReadFile(cfg.AlertmanagerConfigFile)
115115
if err != nil {
116116
return nil, fmt.Errorf("unable to read Alertmanager configuration file %q: %s", cfg.AlertmanagerConfigFile, err)
117117
}
@@ -120,7 +120,7 @@ func NewRunner(cfg RunnerConfig, logger log.Logger) (*Runner, error) {
120120

121121
var rulerConfig rwrulefmt.RuleGroup
122122
if cfg.RulesConfigFile != "" {
123-
b, err := ioutil.ReadFile(cfg.RulesConfigFile)
123+
b, err := os.ReadFile(cfg.RulesConfigFile)
124124
if err != nil {
125125
return nil, fmt.Errorf("unable to read Rules configuration file %q: %s", cfg.RulesConfigFile, err)
126126
}

0 commit comments

Comments
 (0)