We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0e165b commit 51356a3Copy full SHA for 51356a3
internal/decoder/reflection.go
@@ -103,8 +103,7 @@ PATH:
103
case string:
104
// We are expecting a map
105
if typeNum != KindMap {
106
- // XXX - use type names in errors.
107
- return fmt.Errorf("expected a map for %s but found %d", v, typeNum)
+ return fmt.Errorf("expected a map for %s but found %s", v, typeNum.String())
108
}
109
for range size {
110
var key []byte
@@ -125,8 +124,7 @@ PATH:
125
124
case int:
126
// We are expecting an array
127
if typeNum != KindSlice {
128
129
- return fmt.Errorf("expected a slice for %d but found %d", v, typeNum)
+ return fmt.Errorf("expected a slice for %d but found %s", v, typeNum.String())
130
131
var i uint
132
if v < 0 {
0 commit comments