Skip to content

Commit 6635a8f

Browse files
committed
Bump minumim required Go version to 1.13
Since 1.16 is out, we still support the last four minor releases. The bump was required by the prometheus/procfs package using the new `%w` printf directives. However, it also allows us to remove some special casing about build info. Signed-off-by: beorn7 <[email protected]>
1 parent a60c63e commit 6635a8f

File tree

6 files changed

+12
-70
lines changed

6 files changed

+12
-70
lines changed

.circleci/config.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -50,22 +50,6 @@ workflows:
5050
client_golang:
5151
jobs:
5252
# Refer to README.md for the currently supported versions.
53-
- test:
54-
name: go-1-9
55-
go_version: "1.9"
56-
use_gomod_cache: false
57-
- test:
58-
name: go-1-10
59-
go_version: "1.10"
60-
use_gomod_cache: false
61-
- test:
62-
name: go-1-11
63-
go_version: "1.11"
64-
run_lint: true
65-
- test:
66-
name: go-1-12
67-
go_version: "1.12"
68-
run_lint: true
6953
- test:
7054
name: go-1-13
7155
go_version: "1.13"
@@ -78,6 +62,10 @@ workflows:
7862
name: go-1-15
7963
go_version: "1.15"
8064
run_lint: true
65+
- test:
66+
name: go-1-16
67+
go_version: "1.16"
68+
run_lint: true
8169
# Style and unused/missing packages are only checked against
8270
# the latest supported Go version.
8371
run_style_and_unused: true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This is the [Go](http://golang.org) client library for
99
instrumenting application code, and one for creating clients that talk to the
1010
Prometheus HTTP API.
1111

12-
__This library requires Go1.9 or later.__ The minimum required patch releases for older Go versions are Go1.9.7 and Go1.10.3.
12+
__This library requires Go1.13 or later.__
1313

1414
## Important note about releases and stability
1515

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ require (
1111
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2
1212
)
1313

14-
go 1.11
14+
go 1.13

prometheus/build_info.go

Lines changed: 0 additions & 29 deletions
This file was deleted.

prometheus/build_info_pre_1.12.go

Lines changed: 0 additions & 22 deletions
This file was deleted.

prometheus/go_collector.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,12 @@ type memStatsMetrics []struct {
384384
// https://github.com/povilasv/prommod for an example of a collector for the
385385
// module dependencies.
386386
func NewBuildInfoCollector() Collector {
387-
path, version, sum := readBuildInfo()
387+
path, version, sum := "unknown", "unknown", "unknown"
388+
if bi, ok := debug.ReadBuildInfo(); ok {
389+
path = bi.Main.Path
390+
version = bi.Main.Version
391+
sum = bi.Main.Sum
392+
}
388393
c := &selfCollector{MustNewConstMetric(
389394
NewDesc(
390395
"go_build_info",

0 commit comments

Comments
 (0)