From 46d3dd4e6c6c89567048fc0e94a778802b0e09ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20R=C3=BCger?= Date: Wed, 13 Apr 2022 17:21:42 +0200 Subject: [PATCH] Bump minimum required Go version to 1.16 (#1032) 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 1525318..d51e22d 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 cf231ff..ac974ce 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 0d09ba0..e401975 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 d0ace2d..f36810e 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 4cfdda5..0698bb2 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