diff --git a/go.mod b/go.mod index 8baa756..2c16f1e 100644 --- a/go.mod +++ b/go.mod @@ -6,8 +6,8 @@ require ( github.com/alecthomas/kong v0.9.0 github.com/gorilla/mux v1.8.1 github.com/prometheus/client_golang v1.19.0 - github.com/sapcc/go-api-declarations v1.10.10 - github.com/sapcc/go-bits v0.0.0-20240328092936-0e0b562825d4 + github.com/sapcc/go-api-declarations v1.10.11 + github.com/sapcc/go-bits v0.0.0-20240404145041-8c313ab7cd29 go.uber.org/automaxprocs v1.5.3 ) @@ -15,7 +15,7 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.51.1 // indirect + github.com/prometheus/common v0.52.2 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/sergi/go-diff v1.3.1 // indirect golang.org/x/sys v0.18.0 // indirect diff --git a/go.sum b/go.sum index debcaa7..66903c4 100644 --- a/go.sum +++ b/go.sum @@ -28,14 +28,14 @@ github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7km github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.51.1 h1:eIjN50Bwglz6a/c3hAgSMcofL3nD+nFQkV6Dd4DsQCw= -github.com/prometheus/common v0.51.1/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= +github.com/prometheus/common v0.52.2 h1:LW8Vk7BccEdONfrJBDffQGRtpSzi5CQaRZGtboOO2ck= +github.com/prometheus/common v0.52.2/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/sapcc/go-api-declarations v1.10.10 h1:1mrawZ8jink62vhOl5lffTcI54EP7Ye1hc2ZOMLqY7M= -github.com/sapcc/go-api-declarations v1.10.10/go.mod h1:83R3hTANhuRXt/pXDby37IJetw8l7DG41s33Tp9NXxI= -github.com/sapcc/go-bits v0.0.0-20240328092936-0e0b562825d4 h1:McWSE2OxvmMIxI6y1udn7AxJEZ6Ze5FS59nTbIMcTDk= -github.com/sapcc/go-bits v0.0.0-20240328092936-0e0b562825d4/go.mod h1:MfdlJwxZa92nnBfg5LvfR7F6HGxTe9N1N5K+EB09kEg= +github.com/sapcc/go-api-declarations v1.10.11 h1:fxPTNfsriHX/a/eZo/9ugrGyS3oxh5z0xOTJkGmGUlQ= +github.com/sapcc/go-api-declarations v1.10.11/go.mod h1:83R3hTANhuRXt/pXDby37IJetw8l7DG41s33Tp9NXxI= +github.com/sapcc/go-bits v0.0.0-20240404145041-8c313ab7cd29 h1:VD+EQuEAmf57hodpaZUKXhgY8Ww/fgBbQ3+nir4eJUY= +github.com/sapcc/go-bits v0.0.0-20240404145041-8c313ab7cd29/go.mod h1:/sODIcF3aKIQMdSe/LpNGKeqMCehKGCEMPs63ltrcwo= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/vendor/github.com/prometheus/common/expfmt/decode.go b/vendor/github.com/prometheus/common/expfmt/decode.go index b2b89b0..25cfaa2 100644 --- a/vendor/github.com/prometheus/common/expfmt/decode.go +++ b/vendor/github.com/prometheus/common/expfmt/decode.go @@ -75,14 +75,14 @@ func ResponseFormat(h http.Header) Format { func NewDecoder(r io.Reader, format Format) Decoder { switch format.FormatType() { case TypeProtoDelim: - return &protoDecoder{r: r} + return &protoDecoder{r: bufio.NewReader(r)} } return &textDecoder{r: r} } // protoDecoder implements the Decoder interface for protocol buffers. type protoDecoder struct { - r io.Reader + r protodelim.Reader } // Decode implements the Decoder interface. @@ -90,7 +90,7 @@ func (d *protoDecoder) Decode(v *dto.MetricFamily) error { opts := protodelim.UnmarshalOptions{ MaxSize: -1, } - if err := opts.UnmarshalFrom(bufio.NewReader(d.r), v); err != nil { + if err := opts.UnmarshalFrom(d.r, v); err != nil { return err } if !model.IsValidMetricName(model.LabelValue(v.GetName())) { diff --git a/vendor/github.com/sapcc/go-api-declarations/bininfo/bininfo.go b/vendor/github.com/sapcc/go-api-declarations/bininfo/bininfo.go index 8d3ba40..325e378 100644 --- a/vendor/github.com/sapcc/go-api-declarations/bininfo/bininfo.go +++ b/vendor/github.com/sapcc/go-api-declarations/bininfo/bininfo.go @@ -34,13 +34,13 @@ package bininfo import "fmt" var ( - //These variables are filled at buildtime with the -X linker flag. Everything - //except for `binName` may be empty if the build could not determine a value. + // These variables are filled at buildtime with the -X linker flag. Everything + // except for `binName` may be empty if the build could not determine a value. binName string version string commit string buildDate string - //This always starts blank and is filled by SetTaskName(). + // This always starts blank and is filled by SetTaskName(). taskName string ) diff --git a/vendor/modules.txt b/vendor/modules.txt index 1c65426..555eb85 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -18,7 +18,7 @@ github.com/prometheus/client_golang/prometheus/promhttp # github.com/prometheus/client_model v0.6.0 ## explicit; go 1.19 github.com/prometheus/client_model/go -# github.com/prometheus/common v0.51.1 +# github.com/prometheus/common v0.52.2 ## explicit; go 1.21 github.com/prometheus/common/expfmt github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg @@ -28,11 +28,11 @@ github.com/prometheus/common/model github.com/prometheus/procfs github.com/prometheus/procfs/internal/fs github.com/prometheus/procfs/internal/util -# github.com/sapcc/go-api-declarations v1.10.10 +# github.com/sapcc/go-api-declarations v1.10.11 ## explicit; go 1.21 github.com/sapcc/go-api-declarations/bininfo -# github.com/sapcc/go-bits v0.0.0-20240328092936-0e0b562825d4 -## explicit; go 1.21 +# github.com/sapcc/go-bits v0.0.0-20240404145041-8c313ab7cd29 +## explicit; go 1.22 github.com/sapcc/go-bits/assert github.com/sapcc/go-bits/httpapi github.com/sapcc/go-bits/httpapi/pprofapi