Skip to content

Commit

Permalink
Merge pull request #843 from prometheus/beorn7/release
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
beorn7 authored Mar 13, 2021
2 parents e8b72d0 + 6635a8f commit 3cd3985
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 119 deletions.
20 changes: 4 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,22 +50,6 @@ workflows:
client_golang:
jobs:
# Refer to README.md for the currently supported versions.
- test:
name: go-1-9
go_version: "1.9"
use_gomod_cache: false
- test:
name: go-1-10
go_version: "1.10"
use_gomod_cache: false
- test:
name: go-1-11
go_version: "1.11"
run_lint: true
- test:
name: go-1-12
go_version: "1.12"
run_lint: true
- test:
name: go-1-13
go_version: "1.13"
Expand All @@ -78,6 +62,10 @@ workflows:
name: go-1-15
go_version: "1.15"
run_lint: true
- test:
name: go-1-16
go_version: "1.16"
run_lint: true
# Style and unused/missing packages are only checked against
# the latest supported Go version.
run_style_and_unused: true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,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.9 or later.__ The minimum required patch releases for older Go versions are Go1.9.7 and Go1.10.3.
__This library requires Go1.13 or later.__

## Important note about releases and stability

Expand Down
2 changes: 1 addition & 1 deletion api/prometheus/v1/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func ExampleAPI_queryRangeWithAuthBearerToken() {
client, err := api.NewClient(api.Config{
Address: "http://demo.robustperception.io:9090",
// We can use amazing github.com/prometheus/common/config helper!
RoundTripper: config.NewBearerAuthRoundTripper("secret_token", api.DefaultRoundTripper),
RoundTripper: config.NewAuthorizationCredentialsRoundTripper("Bearer", "secret_token", api.DefaultRoundTripper),
})
if err != nil {
fmt.Printf("Error creating client: %v\n", err)
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ require (
github.com/golang/protobuf v1.4.3
github.com/json-iterator/go v1.1.10
github.com/prometheus/client_model v0.2.0
github.com/prometheus/common v0.15.0
github.com/prometheus/procfs v0.3.0
golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e
github.com/prometheus/common v0.18.0
github.com/prometheus/procfs v0.6.0
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2
)

go 1.11
go 1.13
55 changes: 10 additions & 45 deletions go.sum

Large diffs are not rendered by default.

29 changes: 0 additions & 29 deletions prometheus/build_info.go

This file was deleted.

22 changes: 0 additions & 22 deletions prometheus/build_info_pre_1.12.go

This file was deleted.

7 changes: 6 additions & 1 deletion prometheus/go_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,12 @@ type memStatsMetrics []struct {
// https://github.com/povilasv/prommod for an example of a collector for the
// module dependencies.
func NewBuildInfoCollector() Collector {
path, version, sum := readBuildInfo()
path, version, sum := "unknown", "unknown", "unknown"
if bi, ok := debug.ReadBuildInfo(); ok {
path = bi.Main.Path
version = bi.Main.Version
sum = bi.Main.Sum
}
c := &selfCollector{MustNewConstMetric(
NewDesc(
"go_build_info",
Expand Down

0 comments on commit 3cd3985

Please sign in to comment.