From ce6eb4594054960d01b98f5533db05cbec841b87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20R=C3=BCger?= Date: Wed, 13 Apr 2022 13:51:24 +0200 Subject: [PATCH] Bump minimum required Go version to 1.16 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Manuel RĂ¼ger --- .circleci/config.yml | 4 ---- CHANGELOG.md | 4 ++++ README.md | 2 +- go.mod | 2 +- prometheus/collectors/dbstats_collector_test.go | 5 +---- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1525318c7..d51e22d90 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,10 +46,6 @@ workflows: client_golang: jobs: # Refer to README.md for the currently supported versions. - - test: - name: go-1-15 - go_version: "1.15" - run_lint: true - test: name: go-1-16 go_version: "1.16" diff --git a/CHANGELOG.md b/CHANGELOG.md index cf231ffd6..ac974ce16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## Unreleased + +* [CHANGE] Minimum required Go version is now 1.16. + ## 1.12.1 / 2022-01-29 * [BUGFIX] Make the Go 1.17 collector concurrency-safe #969 diff --git a/README.md b/README.md index 0d09ba03c..e40197564 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ This is the [Go](http://golang.org) client library for instrumenting application code, and one for creating clients that talk to the Prometheus HTTP API. -__This library requires Go1.15 or later.__ +__This library requires Go1.16 or later.__ ## Important note about releases and stability diff --git a/go.mod b/go.mod index d0ace2d9b..f36810ed2 100644 --- a/go.mod +++ b/go.mod @@ -12,4 +12,4 @@ require ( google.golang.org/protobuf v1.28.0 ) -go 1.15 +go 1.16 diff --git a/prometheus/collectors/dbstats_collector_test.go b/prometheus/collectors/dbstats_collector_test.go index 4cfdda541..0698bb289 100644 --- a/prometheus/collectors/dbstats_collector_test.go +++ b/prometheus/collectors/dbstats_collector_test.go @@ -15,7 +15,6 @@ package collectors import ( "database/sql" - "runtime" "testing" "github.com/prometheus/client_golang/prometheus" @@ -50,9 +49,7 @@ func TestDBStatsCollector(t *testing.T) { "go_sql_wait_duration_seconds_total", "go_sql_max_idle_closed_total", "go_sql_max_lifetime_closed_total", - } - if runtime.Version() >= "go1.15" { - names = append(names, "go_sql_max_idle_time_closed_total") + "go_sql_max_idle_time_closed_total", } type result struct { found bool