Skip to content

Commit 00e3fd7

Browse files
author
Julien Pivotto
authored
Merge pull request #418 from roidelapluie/go119
Update deps and test with go 1.19
2 parents ddb642f + 045094f commit 00e3fd7

File tree

8 files changed

+68
-309
lines changed

8 files changed

+68
-309
lines changed

.circleci/config.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,13 @@ workflows:
9696
go_version:
9797
- "1.17"
9898
- "1.18"
99+
- "1.19"
99100
- test-assets:
100101
name: assets-go-<< matrix.go_version >>
101102
matrix:
102103
parameters:
103104
go_version:
104-
- "1.18"
105+
- "1.19"
105106
- style:
106107
name: style
107-
go_version: "1.18"
108+
go_version: "1.19"

config/config.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func (s Secret) MarshalYAML() (interface{}, error) {
3434
return nil, nil
3535
}
3636

37-
//UnmarshalYAML implements the yaml.Unmarshaler interface for Secrets.
37+
// UnmarshalYAML implements the yaml.Unmarshaler interface for Secrets.
3838
func (s *Secret) UnmarshalYAML(unmarshal func(interface{}) error) error {
3939
type plain Secret
4040
return unmarshal((*plain)(s))

expfmt/fuzz.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ import "bytes"
2121

2222
// Fuzz text metric parser with with github.com/dvyukov/go-fuzz:
2323
//
24-
// go-fuzz-build github.com/prometheus/common/expfmt
25-
// go-fuzz -bin expfmt-fuzz.zip -workdir fuzz
24+
// go-fuzz-build github.com/prometheus/common/expfmt
25+
// go-fuzz -bin expfmt-fuzz.zip -workdir fuzz
2626
//
2727
// Further input samples should go in the folder fuzz/corpus.
2828
func Fuzz(in []byte) int {

expfmt/openmetrics_create.go

+11-11
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,20 @@ import (
4646
// missing features and peculiarities to avoid complications when switching from
4747
// Prometheus to OpenMetrics or vice versa:
4848
//
49-
// - Counters are expected to have the `_total` suffix in their metric name. In
50-
// the output, the suffix will be truncated from the `# TYPE` and `# HELP`
51-
// line. A counter with a missing `_total` suffix is not an error. However,
52-
// its type will be set to `unknown` in that case to avoid invalid OpenMetrics
53-
// output.
49+
// - Counters are expected to have the `_total` suffix in their metric name. In
50+
// the output, the suffix will be truncated from the `# TYPE` and `# HELP`
51+
// line. A counter with a missing `_total` suffix is not an error. However,
52+
// its type will be set to `unknown` in that case to avoid invalid OpenMetrics
53+
// output.
5454
//
55-
// - No support for the following (optional) features: `# UNIT` line, `_created`
56-
// line, info type, stateset type, gaugehistogram type.
55+
// - No support for the following (optional) features: `# UNIT` line, `_created`
56+
// line, info type, stateset type, gaugehistogram type.
5757
//
58-
// - The size of exemplar labels is not checked (i.e. it's possible to create
59-
// exemplars that are larger than allowed by the OpenMetrics specification).
58+
// - The size of exemplar labels is not checked (i.e. it's possible to create
59+
// exemplars that are larger than allowed by the OpenMetrics specification).
6060
//
61-
// - The value of Counters is not checked. (OpenMetrics doesn't allow counters
62-
// with a `NaN` value.)
61+
// - The value of Counters is not checked. (OpenMetrics doesn't allow counters
62+
// with a `NaN` value.)
6363
func MetricFamilyToOpenMetrics(out io.Writer, in *dto.MetricFamily) (written int, err error) {
6464
name := in.GetName()
6565
if name == "" {

go.mod

+7-7
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ require (
66
github.com/go-kit/log v0.2.1
77
github.com/golang/protobuf v1.5.2
88
github.com/julienschmidt/httprouter v1.3.0
9-
github.com/matttproud/golang_protobuf_extensions v1.0.2
9+
github.com/matttproud/golang_protobuf_extensions v1.0.4
1010
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f
11-
github.com/prometheus/client_golang v1.13.0
12-
github.com/prometheus/client_model v0.2.0
13-
golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48
14-
golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c
11+
github.com/prometheus/client_golang v1.14.0
12+
github.com/prometheus/client_model v0.3.0
13+
golang.org/x/net v0.4.0
14+
golang.org/x/oauth2 v0.3.0
1515
gopkg.in/alecthomas/kingpin.v2 v2.2.6
1616
gopkg.in/yaml.v2 v2.4.0
1717
)
@@ -25,8 +25,8 @@ require (
2525
github.com/jpillora/backoff v1.0.0 // indirect
2626
github.com/prometheus/procfs v0.8.0 // indirect
2727
github.com/stretchr/testify v1.8.0 // indirect
28-
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect
29-
golang.org/x/text v0.3.7 // indirect
28+
golang.org/x/sys v0.3.0 // indirect
29+
golang.org/x/text v0.5.0 // indirect
3030
google.golang.org/appengine v1.6.7 // indirect
3131
google.golang.org/protobuf v1.28.1 // indirect
3232
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect

go.sum

+24-262
Large diffs are not rendered by default.

internal/bitbucket.org/ww/goautoneg/autoneg.go

+10-12
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ Redistribution and use in source and binary forms, with or without
1111
modification, are permitted provided that the following conditions are
1212
met:
1313
14-
Redistributions of source code must retain the above copyright
15-
notice, this list of conditions and the following disclaimer.
14+
Redistributions of source code must retain the above copyright
15+
notice, this list of conditions and the following disclaimer.
1616
17-
Redistributions in binary form must reproduce the above copyright
18-
notice, this list of conditions and the following disclaimer in
19-
the documentation and/or other materials provided with the
20-
distribution.
17+
Redistributions in binary form must reproduce the above copyright
18+
notice, this list of conditions and the following disclaimer in
19+
the documentation and/or other materials provided with the
20+
distribution.
2121
22-
Neither the name of the Open Knowledge Foundation Ltd. nor the
23-
names of its contributors may be used to endorse or promote
24-
products derived from this software without specific prior written
25-
permission.
22+
Neither the name of the Open Knowledge Foundation Ltd. nor the
23+
names of its contributors may be used to endorse or promote
24+
products derived from this software without specific prior written
25+
permission.
2626
2727
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2828
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -35,8 +35,6 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3535
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3636
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3737
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38-
39-
4038
*/
4139
package goautoneg
4240

internal/bitbucket.org/ww/goautoneg/autoneg_test.go

+10-12
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ Redistribution and use in source and binary forms, with or without
1111
modification, are permitted provided that the following conditions are
1212
met:
1313
14-
Redistributions of source code must retain the above copyright
15-
notice, this list of conditions and the following disclaimer.
14+
Redistributions of source code must retain the above copyright
15+
notice, this list of conditions and the following disclaimer.
1616
17-
Redistributions in binary form must reproduce the above copyright
18-
notice, this list of conditions and the following disclaimer in
19-
the documentation and/or other materials provided with the
20-
distribution.
17+
Redistributions in binary form must reproduce the above copyright
18+
notice, this list of conditions and the following disclaimer in
19+
the documentation and/or other materials provided with the
20+
distribution.
2121
22-
Neither the name of the Open Knowledge Foundation Ltd. nor the
23-
names of its contributors may be used to endorse or promote
24-
products derived from this software without specific prior written
25-
permission.
22+
Neither the name of the Open Knowledge Foundation Ltd. nor the
23+
names of its contributors may be used to endorse or promote
24+
products derived from this software without specific prior written
25+
permission.
2626
2727
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2828
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -35,8 +35,6 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3535
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3636
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3737
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38-
39-
4038
*/
4139
package goautoneg
4240

0 commit comments

Comments
 (0)