From b8308329f085fe7729286cb1ad7a8af7ad022c25 Mon Sep 17 00:00:00 2001 From: beorn7 Date: Tue, 15 Oct 2019 13:43:53 +0200 Subject: [PATCH 1/3] Fix function names in API examples The part after the underscore has to be lowercase. Otherwise, it is seen as the name of a Go type, which doesn't exist, which will result in the example not showing up in godoc. Signed-off-by: beorn7 --- api/prometheus/v1/example_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/prometheus/v1/example_test.go b/api/prometheus/v1/example_test.go index 6d689fb..f981304 100644 --- a/api/prometheus/v1/example_test.go +++ b/api/prometheus/v1/example_test.go @@ -25,7 +25,7 @@ import ( v1 "github.com/prometheus/client_golang/api/prometheus/v1" ) -func ExampleAPI_Query() { +func ExampleAPI_query() { client, err := api.NewClient(api.Config{ Address: "http://demo.robustperception.io:9090", }) @@ -48,7 +48,7 @@ func ExampleAPI_Query() { fmt.Printf("Result:\n%v\n", result) } -func ExampleAPI_QueryRange() { +func ExampleAPI_queryRange() { client, err := api.NewClient(api.Config{ Address: "http://demo.robustperception.io:9090", }) @@ -76,7 +76,7 @@ func ExampleAPI_QueryRange() { fmt.Printf("Result:\n%v\n", result) } -func ExampleAPI_Series() { +func ExampleAPI_series() { client, err := api.NewClient(api.Config{ Address: "http://demo.robustperception.io:9090", }) From b4686f3863ebac78710c1652782df73106229048 Mon Sep 17 00:00:00 2001 From: beorn7 Date: Tue, 15 Oct 2019 13:45:04 +0200 Subject: [PATCH 2/3] Update dependencies Just to make sure we are up to date before releasing. This only affects golang.org/x/sys. Signed-off-by: beorn7 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 51311fc..c6d06f2 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 github.com/prometheus/common v0.7.0 github.com/prometheus/procfs v0.0.5 - golang.org/x/sys v0.0.0-20190927073244-c990c680b611 + golang.org/x/sys v0.0.0-20191010194322-b09406accb47 ) go 1.11 diff --git a/go.sum b/go.sum index a0e4eff..4af03bb 100644 --- a/go.sum +++ b/go.sum @@ -90,8 +90,8 @@ golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5 h1:mzjBh+S5frKOsOBobWIMAbXav golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190927073244-c990c680b611 h1:q9u40nxWT5zRClI/uU9dHCiYGottAg6Nzz4YUQyHxdA= -golang.org/x/sys v0.0.0-20190927073244-c990c680b611/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191010194322-b09406accb47 h1:/XfQ9z7ib8eEJX2hdgFTZJ/ntt0swNk5oYBziWeTCvY= +golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 3ee92dfa3145f6c5466e3aa83b1949886839f922 Mon Sep 17 00:00:00 2001 From: beorn7 Date: Tue, 15 Oct 2019 13:46:37 +0200 Subject: [PATCH 3/3] Cut v1.2.0 One might argue that supporting the newest Pushgateway is just an enhancement or even a bugfix (and this should be v1.1.1, which would be a really nice version number). I decided to go for a positive view of things and call it a feature. If something else changes its behavior, it's not really a bug from client_golang's point of view. Signed-off-by: beorn7 --- CHANGELOG.md | 7 +++++++ VERSION | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3234dbb..41979bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## 1.2.0 / 2019-10-15 + +* [FEATURE] Support pushing to Pushgateway v0.10+. #652 +* [ENHANCEMENT] Improve hashing to make a spurious `AlreadyRegisteredError` less likely to occur. #657 +* [ENHANCEMENT] API client: Add godoc examples. #630 +* [BUGFIX] promhttp: Correctly call WriteHeader in HTTP middleware. #634 + ## 1.1.0 / 2019-08-01 * [CHANGE] API client: Format time as UTC rather than RFC3339Nano. #617 diff --git a/VERSION b/VERSION index 9084fa2..26aaba0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.0 +1.2.0