diff options
| author | 2024-09-16 11:06:00 +0200 | |
|---|---|---|
| committer | 2024-09-16 09:06:00 +0000 | |
| commit | b2572b9e074ebbce8bcf1b9979d4d8ea066650d6 (patch) | |
| tree | 0c2a08ed63b582676ce7661252a6917db751c62a /vendor/github.com/prometheus/common/expfmt/encode.go | |
| parent | [chore]: Bump golang.org/x/net from 0.28.0 to 0.29.0 (#3303) (diff) | |
| download | gotosocial-b2572b9e074ebbce8bcf1b9979d4d8ea066650d6.tar.xz | |
[chore] Bump otel deps -> v1.30.0/v0.52.0 (#3307)
Diffstat (limited to 'vendor/github.com/prometheus/common/expfmt/encode.go')
| -rw-r--r-- | vendor/github.com/prometheus/common/expfmt/encode.go | 24 | 
1 files changed, 12 insertions, 12 deletions
| diff --git a/vendor/github.com/prometheus/common/expfmt/encode.go b/vendor/github.com/prometheus/common/expfmt/encode.go index ff5ef7a9d..cf0c150c2 100644 --- a/vendor/github.com/prometheus/common/expfmt/encode.go +++ b/vendor/github.com/prometheus/common/expfmt/encode.go @@ -77,18 +77,18 @@ func Negotiate(h http.Header) Format {  		if ac.Type+"/"+ac.SubType == ProtoType && ac.Params["proto"] == ProtoProtocol {  			switch ac.Params["encoding"] {  			case "delimited": -				return fmtProtoDelim + escapingScheme +				return FmtProtoDelim + escapingScheme  			case "text": -				return fmtProtoText + escapingScheme +				return FmtProtoText + escapingScheme  			case "compact-text": -				return fmtProtoCompact + escapingScheme +				return FmtProtoCompact + escapingScheme  			}  		}  		if ac.Type == "text" && ac.SubType == "plain" && (ver == TextVersion || ver == "") { -			return fmtText + escapingScheme +			return FmtText + escapingScheme  		}  	} -	return fmtText + escapingScheme +	return FmtText + escapingScheme  }  // NegotiateIncludingOpenMetrics works like Negotiate but includes @@ -110,26 +110,26 @@ func NegotiateIncludingOpenMetrics(h http.Header) Format {  		if ac.Type+"/"+ac.SubType == ProtoType && ac.Params["proto"] == ProtoProtocol {  			switch ac.Params["encoding"] {  			case "delimited": -				return fmtProtoDelim + escapingScheme +				return FmtProtoDelim + escapingScheme  			case "text": -				return fmtProtoText + escapingScheme +				return FmtProtoText + escapingScheme  			case "compact-text": -				return fmtProtoCompact + escapingScheme +				return FmtProtoCompact + escapingScheme  			}  		}  		if ac.Type == "text" && ac.SubType == "plain" && (ver == TextVersion || ver == "") { -			return fmtText + escapingScheme +			return FmtText + escapingScheme  		}  		if ac.Type+"/"+ac.SubType == OpenMetricsType && (ver == OpenMetricsVersion_0_0_1 || ver == OpenMetricsVersion_1_0_0 || ver == "") {  			switch ver {  			case OpenMetricsVersion_1_0_0: -				return fmtOpenMetrics_1_0_0 + escapingScheme +				return FmtOpenMetrics_1_0_0 + escapingScheme  			default: -				return fmtOpenMetrics_0_0_1 + escapingScheme +				return FmtOpenMetrics_0_0_1 + escapingScheme  			}  		}  	} -	return fmtText + escapingScheme +	return FmtText + escapingScheme  }  // NewEncoder returns a new encoder based on content type negotiation. All | 
