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:
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"

View File

@ -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

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
Prometheus HTTP API.
__This library requires Go1.15 or later.__
__This library requires Go1.16 or later.__
## Important note about releases and stability

2
go.mod
View File

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

View File

@ -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