From 30ca184b395de1d347815c39e9df3c864c41adef Mon Sep 17 00:00:00 2001 From: Wil Cram Date: Wed, 13 Aug 2025 18:10:48 +0000 Subject: [PATCH] docs: fix typo in expfmt.Negotiate Signed-off-by: Wil Cram --- expfmt/encode.go | 2 +- expfmt/encode_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/expfmt/encode.go b/expfmt/encode.go index 547c05ee4..6af7e0014 100644 --- a/expfmt/encode.go +++ b/expfmt/encode.go @@ -61,7 +61,7 @@ func (ec encoderCloser) Close() error { // appropriate accepted type is found, FmtText is returned (which is the // Prometheus text format). This function will never negotiate FmtOpenMetrics, // as the support is still experimental. To include the option to negotiate -// FmtOpenMetrics, use NegotiateOpenMetrics. +// FmtOpenMetrics, use NegotiateIncludingOpenMetrics. func Negotiate(h http.Header) Format { escapingScheme := Format(fmt.Sprintf("; escaping=%s", Format(model.NameEscapingScheme.String()))) for _, ac := range goautoneg.ParseAccept(h.Get(hdrAccept)) { diff --git a/expfmt/encode_test.go b/expfmt/encode_test.go index df0b2ed42..b7d3418f7 100644 --- a/expfmt/encode_test.go +++ b/expfmt/encode_test.go @@ -99,7 +99,7 @@ func TestNegotiate(t *testing.T) { } } -func TestNegotiateOpenMetrics(t *testing.T) { +func TestNegotiateIncludingOpenMetrics(t *testing.T) { acceptValuePrefix := "application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily" tests := []struct { name string