tape: DecodeAny only returns an error when there is one
This commit is contained in:
parent
b174015319
commit
aa718cfe9f
@ -156,8 +156,10 @@ func decodeAny(decoder *Decoder, destination reflect.Value, tag Tag) (n int, err
|
|||||||
n += nn; if err != nil { return n, err }
|
n += nn; if err != nil { return n, err }
|
||||||
table.SetMapIndex(reflect.ValueOf(key), value)
|
table.SetMapIndex(reflect.ValueOf(key), value)
|
||||||
}
|
}
|
||||||
}
|
default:
|
||||||
return n, fmt.Errorf("unknown TN %d", tag.TN())
|
return n, fmt.Errorf("unknown TN %d", tag.TN())
|
||||||
|
}
|
||||||
|
return n, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// TagAny returns the correct tag for an "any" value. Returns an error if the
|
// TagAny returns the correct tag for an "any" value. Returns an error if the
|
||||||
|
Loading…
Reference in New Issue
Block a user