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 77bb546 commit 752d9a5Copy full SHA for 752d9a5
internal/decoder/reflection.go
@@ -107,8 +107,7 @@ PATH:
107
case string:
108
// We are expecting a map
109
if typeNum != KindMap {
110
- // XXX - use type names in errors.
111
- 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())
112
}
113
for range size {
114
var key []byte
@@ -129,8 +128,7 @@ PATH:
129
128
case int:
130
// We are expecting an array
131
if typeNum != KindSlice {
132
133
- 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())
134
135
var i uint
136
if v < 0 {
0 commit comments