Skip to content

Commit 353395b

Browse files
author
Arthur Silva Sens
authored
Remove support for go 1.19 (#1449)
* Remove support for go 1.19 Signed-off-by: Arthur Silva Sens <[email protected]> * Replace rand.Seed, deprecated in go 1.20 Signed-off-by: Arthur Silva Sens <[email protected]> --------- Signed-off-by: Arthur Silva Sens <[email protected]>
1 parent 9dd5d2a commit 353395b

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

.github/workflows/go.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
strategy:
2020
matrix:
21-
go_version: ["1.19", "1.20", "1.21", "1.22"]
21+
go_version: ["1.20", "1.21", "1.22"]
2222

2323
steps:
2424
- name: Checkout code

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ test: deps common-test
2121
test-short: deps common-test-short
2222

2323
.PHONY: generate-go-collector-test-files
24-
VERSIONS := 1.19 1.20 1.21 1.22
24+
VERSIONS := 1.20 1.21 1.22
2525
generate-go-collector-test-files:
2626
for GO_VERSION in $(VERSIONS); do \
2727
docker run \

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ This is the [Go](http://golang.org) client library for
1010
instrumenting application code, and one for creating clients that talk to the
1111
Prometheus HTTP API.
1212

13-
**This library requires Go1.19 or later.**
14-
> The library mandates the use of Go1.19 or subsequent versions. While it has demonstrated functionality with versions as old as Go 1.17, our commitment remains to offer support and rectifications for only the most recent three major releases.
13+
**This library requires Go1.20 or later.**
14+
> The library mandates the use of Go1.20 or subsequent versions. While it has demonstrated functionality with versions as old as Go 1.17, our commitment remains to offer support and rectifications for only the most recent three major releases.
1515
1616
## Important note about releases and stability
1717

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/prometheus/client_golang
22

3-
go 1.19
3+
go 1.20
44

55
require (
66
github.com/beorn7/perks v1.0.1

prometheus/histogram_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ func TestHistogramConcurrency(t *testing.T) {
157157
t.Skip("Skipping test in short mode.")
158158
}
159159

160-
rand.Seed(42)
160+
rand.New(rand.NewSource(42))
161161

162162
it := func(n uint32) bool {
163163
mutations := int(n%1e4 + 1e4)
@@ -243,7 +243,7 @@ func TestHistogramVecConcurrency(t *testing.T) {
243243
t.Skip("Skipping test in short mode.")
244244
}
245245

246-
rand.Seed(42)
246+
rand.New(rand.NewSource(42))
247247

248248
it := func(n uint32) bool {
249249
mutations := int(n%1e4 + 1e4)
@@ -1010,7 +1010,7 @@ func TestNativeHistogramConcurrency(t *testing.T) {
10101010
t.Skip("Skipping test in short mode.")
10111011
}
10121012

1013-
rand.Seed(42)
1013+
rand.New(rand.NewSource(42))
10141014

10151015
it := func(n uint32) bool {
10161016
ts := time.Now().Add(30 * time.Second).Unix()

prometheus/summary_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ func TestSummaryConcurrency(t *testing.T) {
203203
t.Skip("Skipping test in short mode.")
204204
}
205205

206-
rand.Seed(42)
206+
rand.New(rand.NewSource(42))
207207
objMap := map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001}
208208

209209
it := func(n uint32) bool {
@@ -284,7 +284,7 @@ func TestSummaryVecConcurrency(t *testing.T) {
284284
t.Skip("Skipping test in short mode.")
285285
}
286286

287-
rand.Seed(42)
287+
rand.New(rand.NewSource(42))
288288
objMap := map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001}
289289

290290
objSlice := make([]float64, 0, len(objMap))

0 commit comments

Comments
 (0)