2
0

Use correct format verb for unknown type error

This commit is contained in:
Robert Welin
2020-03-27 13:20:04 +00:00
parent 7e1301257e
commit 43bf713180
+2 -2
View File
@@ -404,7 +404,7 @@ func scanUnknownType(oid uint32, formatCode int16, buf []byte, dest interface{})
switch dest := dest.(type) {
case *string:
if formatCode == BinaryFormatCode {
return errors.Errorf("unknown oid %d in binary format cannot be scanned into %t", oid, dest)
return errors.Errorf("unknown oid %d in binary format cannot be scanned into %T", oid, dest)
}
*dest = string(buf)
return nil
@@ -415,7 +415,7 @@ func scanUnknownType(oid uint32, formatCode int16, buf []byte, dest interface{})
if nextDst, retry := GetAssignToDstType(dest); retry {
return scanUnknownType(oid, formatCode, buf, nextDst)
}
return errors.Errorf("unknown oid %d cannot be scanned into %t", oid, dest)
return errors.Errorf("unknown oid %d cannot be scanned into %T", oid, dest)
}
}