Files
QSfera/vendor/github.com/shamaton/msgpack/v2/internal/decoding/bool.go
T
dependabot[bot]andRalf Haferkamp b3e5d80306 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>
2024-09-23 12:57:52 +02:00

23 lines
391 B
Go

package decoding
import (
"reflect"
"github.com/shamaton/msgpack/v2/def"
)
func (d *decoder) asBool(offset int, k reflect.Kind) (bool, int, error) {
code, offset, err := d.readSize1(offset)
if err != nil {
return false, 0, err
}
switch code {
case def.True:
return true, offset, nil
case def.False:
return false, offset, nil
}
return false, 0, d.errorTemplate(code, k)
}