Skip to content

Commit 47abc06

Browse files
committed
updates
1 parent b0455bf commit 47abc06

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mongo/integration/cmd_monitoring_helpers_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func compareValues(mt *mtest.T, key string, expected, actual bson.RawValue) erro
8282
if typeVal, err := e.LookupErr("$$type"); err == nil {
8383
// $$type represents a type assertion
8484
// for example {field: {$$type: "binData"}} should assert that "field" is an element with a binary value
85-
switch t := typeVal.Type; t {
85+
switch typ := typeVal.Type; typ {
8686
case bson.TypeString:
8787
return checkValueType(mt, key, actual.Type, typeVal.StringValue())
8888
case bson.TypeArray:
@@ -96,9 +96,9 @@ func compareValues(mt *mtest.T, key string, expected, actual bson.RawValue) erro
9696
return nil
9797
}
9898
}
99-
return fmt.Errorf("BSON type mismatch for key %s; expected %s, got %s", key, array.String(), actual)
99+
return fmt.Errorf("BSON type mismatch for key %q; expected %s, got %q", key, array, actual.Type)
100100
default:
101-
return fmt.Errorf("unsupported $$type: %s", t.String())
101+
return fmt.Errorf("unsupported $$type: %q", typ)
102102
}
103103
}
104104

0 commit comments

Comments
 (0)