fix gofumpt lint

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
This commit is contained in:
dongjiang1989 2024-04-12 17:39:17 +08:00
parent 3aeef40009
commit 24566cd387
No known key found for this signature in database
2 changed files with 0 additions and 17 deletions

View File

@ -264,7 +264,6 @@ func compareMetricFamilies(got, expected []*dto.MetricFamily, metricNames ...str
// The error contains the encoded text of both the desired and the actual
// result.
func compare(got, want []*dto.MetricFamily) error {
var gotBuf, wantBuf bytes.Buffer
enc := expfmt.NewEncoder(&gotBuf, expfmt.NewFormat(expfmt.TypeTextPlain))
for _, mf := range got {

View File

@ -305,22 +305,6 @@ func TestMetricNotFound(t *testing.T) {
expected := `
some_other_metric{label1="value1"} 1
`
/*
expectedError := `
Diff:
--- metric output does not match expectation; want
+++ got:
@@ -1,4 +1,4 @@
-(bytes.Buffer) # HELP some_other_metric A value that represents a counter.
-# TYPE some_other_metric counter
-some_other_metric{label1="value1"} 1
+(bytes.Buffer) # HELP some_total A value that represents a counter.
+# TYPE some_total counter
+some_total{label1="value1"} 1
`
*/
expectedError := `