fix gofumpt lint
Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
This commit is contained in:
parent
3aeef40009
commit
24566cd387
|
@ -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 {
|
||||
|
|
|
@ -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 := `
|
||||
|
||||
|
|
Loading…
Reference in New Issue