chore(deps): bump github.com/shamaton/msgpack/v2 from 2.2.0 to 2.2.2
Bumps [github.com/shamaton/msgpack/v2](https://github.com/shamaton/msgpack) from 2.2.0 to 2.2.2. - [Release notes](https://github.com/shamaton/msgpack/releases) - [Commits](https://github.com/shamaton/msgpack/compare/v2.2.0...v2.2.2) --- updated-dependencies: - dependency-name: github.com/shamaton/msgpack/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
Ralf Haferkamp
parent
54c8567697
commit
b3e5d80306
+5
-5
@@ -45,7 +45,7 @@ func Encode(v interface{}, asArray bool) (b []byte, err error) {
|
||||
e.d = make([]byte, size)
|
||||
last := e.create(rv, 0)
|
||||
if size != last {
|
||||
return nil, fmt.Errorf("failed serialization size=%d, lastIdx=%d", size, last)
|
||||
return nil, fmt.Errorf("%w size=%d, lastIdx=%d", def.ErrNotMatchLastIndex, size, last)
|
||||
}
|
||||
return e.d, err
|
||||
}
|
||||
@@ -116,7 +116,7 @@ func (e *encoder) calcSize(rv reflect.Value) (int, error) {
|
||||
ret += def.Byte4
|
||||
} else {
|
||||
// not supported error
|
||||
return 0, fmt.Errorf("not support this array length : %d", l)
|
||||
return 0, fmt.Errorf("%w array length : %d", def.ErrUnsupportedType, l)
|
||||
}
|
||||
|
||||
if size, find := e.calcFixedSlice(rv); find {
|
||||
@@ -164,7 +164,7 @@ func (e *encoder) calcSize(rv reflect.Value) (int, error) {
|
||||
ret += def.Byte4
|
||||
} else {
|
||||
// not supported error
|
||||
return 0, fmt.Errorf("not support this array length : %d", l)
|
||||
return 0, fmt.Errorf("array length %d is %w", l, def.ErrUnsupportedLength)
|
||||
}
|
||||
|
||||
// func
|
||||
@@ -201,7 +201,7 @@ func (e *encoder) calcSize(rv reflect.Value) (int, error) {
|
||||
ret += def.Byte4
|
||||
} else {
|
||||
// not supported error
|
||||
return 0, fmt.Errorf("not support this map length : %d", l)
|
||||
return 0, fmt.Errorf("map length %d is %w", l, def.ErrUnsupportedLength)
|
||||
}
|
||||
|
||||
if size, find := e.calcFixedMap(rv); find {
|
||||
@@ -262,7 +262,7 @@ func (e *encoder) calcSize(rv reflect.Value) (int, error) {
|
||||
// do nothing (return nil)
|
||||
|
||||
default:
|
||||
return 0, fmt.Errorf("type(%v) is unsupported", rv.Kind())
|
||||
return 0, fmt.Errorf("%v is %w type", rv.Kind(), def.ErrUnsupportedType)
|
||||
}
|
||||
|
||||
return ret, nil
|
||||
|
||||
Reference in New Issue
Block a user