Bump minimum required Go version to 1.16 (#1032)

Signed-off-by: Manuel Rüger <manuel@rueg.eu>
This commit is contained in:
Manuel Rüger 2022-04-13 17:21:42 +02:00 committed by GitHub
parent 24172847e3
commit 46d3dd4e6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 10 deletions

View File

@ -46,10 +46,6 @@ workflows:
client_golang: client_golang:
jobs: jobs:
# Refer to README.md for the currently supported versions. # Refer to README.md for the currently supported versions.
- test:
name: go-1-15
go_version: "1.15"
run_lint: true
- test: - test:
name: go-1-16 name: go-1-16
go_version: "1.16" go_version: "1.16"

View File

@ -1,3 +1,7 @@
## Unreleased
* [CHANGE] Minimum required Go version is now 1.16.
## 1.12.1 / 2022-01-29 ## 1.12.1 / 2022-01-29
* [BUGFIX] Make the Go 1.17 collector concurrency-safe #969 * [BUGFIX] Make the Go 1.17 collector concurrency-safe #969

View File

@ -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 instrumenting application code, and one for creating clients that talk to the
Prometheus HTTP API. Prometheus HTTP API.
__This library requires Go1.15 or later.__ __This library requires Go1.16 or later.__
## Important note about releases and stability ## Important note about releases and stability

2
go.mod
View File

@ -12,4 +12,4 @@ require (
google.golang.org/protobuf v1.28.0 google.golang.org/protobuf v1.28.0
) )
go 1.15 go 1.16

View File

@ -15,7 +15,6 @@ package collectors
import ( import (
"database/sql" "database/sql"
"runtime"
"testing" "testing"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
@ -50,9 +49,7 @@ func TestDBStatsCollector(t *testing.T) {
"go_sql_wait_duration_seconds_total", "go_sql_wait_duration_seconds_total",
"go_sql_max_idle_closed_total", "go_sql_max_idle_closed_total",
"go_sql_max_lifetime_closed_total", "go_sql_max_lifetime_closed_total",
} "go_sql_max_idle_time_closed_total",
if runtime.Version() >= "go1.15" {
names = append(names, "go_sql_max_idle_time_closed_total")
} }
type result struct { type result struct {
found bool found bool