summaryrefslogtreecommitdiff
path: root/vendor/github.com/prometheus/common/expfmt/decode.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-09-16 11:06:00 +0200
committerLibravatar GitHub <noreply@github.com>2024-09-16 09:06:00 +0000
commitb2572b9e074ebbce8bcf1b9979d4d8ea066650d6 (patch)
tree0c2a08ed63b582676ce7661252a6917db751c62a /vendor/github.com/prometheus/common/expfmt/decode.go
parent[chore]: Bump golang.org/x/net from 0.28.0 to 0.29.0 (#3303) (diff)
downloadgotosocial-b2572b9e074ebbce8bcf1b9979d4d8ea066650d6.tar.xz
[chore] Bump otel deps -> v1.30.0/v0.52.0 (#3307)
Diffstat (limited to 'vendor/github.com/prometheus/common/expfmt/decode.go')
-rw-r--r--vendor/github.com/prometheus/common/expfmt/decode.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/vendor/github.com/prometheus/common/expfmt/decode.go b/vendor/github.com/prometheus/common/expfmt/decode.go
index 25cfaa216..1448439b7 100644
--- a/vendor/github.com/prometheus/common/expfmt/decode.go
+++ b/vendor/github.com/prometheus/common/expfmt/decode.go
@@ -45,7 +45,7 @@ func ResponseFormat(h http.Header) Format {
mediatype, params, err := mime.ParseMediaType(ct)
if err != nil {
- return fmtUnknown
+ return FmtUnknown
}
const textType = "text/plain"
@@ -53,21 +53,21 @@ func ResponseFormat(h http.Header) Format {
switch mediatype {
case ProtoType:
if p, ok := params["proto"]; ok && p != ProtoProtocol {
- return fmtUnknown
+ return FmtUnknown
}
if e, ok := params["encoding"]; ok && e != "delimited" {
- return fmtUnknown
+ return FmtUnknown
}
- return fmtProtoDelim
+ return FmtProtoDelim
case textType:
if v, ok := params["version"]; ok && v != TextVersion {
- return fmtUnknown
+ return FmtUnknown
}
- return fmtText
+ return FmtText
}
- return fmtUnknown
+ return FmtUnknown
}
// NewDecoder returns a new decoder based on the given input format.