v2.6.0
This release adds important new features, optimizations, bug fixes, and 3 new contributors. Fuzz tests passed 5+ billion execs for CBOR encoding and decoding functions. Minimum officially supported Go is bumped to Go 1.17.
⭐ Features and Optimizations
- Add FieldNameMatching decode option. by @benluddy in #433
- Add option to decode CBOR bignum to
interface{}
as*big.Int
by @fxamacker in #456 - Add 2 more options for decoding CBOR integers to
interface{}
by @fxamacker in #457 - Add encoding option to specify how omitempty fields are encoded by @dinhxuanvu in #453
- New options for encoding Go strings to and from CBOR byte strings by @benluddy in #465
- Add options to support byte string map keys as struct field names by @benluddy in #472
- Add option to specify how to decode unrecognized CBOR tag to
any
by @ssuriyan7 in #475
🚀 Notable Optimizations
-
Improve memory allocs 🗜️ and speed 🚀 of encoding maps by using Go 1.18-1.20 features by @dinhxuanvu in #468
NOTE: Go 1.17 is the minimum version supported by v2.6.0. Go 1.20+ will use optimizations introduced by PR 468.
🛠 Improvements
- Refactor valid() to reject negative values for integer modes by @fxamacker in #434
- Refactor tests to improve consistency and readability by @fxamacker in #458
- Add another test and fix lint errors by @fxamacker in #466
- Refactor map encoding to prep for Go version bump by @fxamacker in #473
- Add
UnrecognizedTagToAny
option toTestDecOptions
by @fxamacker in #484 - Update go.mod to require go 1.17 by @fxamacker in #489
🐞 Bug Fixes
- Fix panic when decoding CBOR nil to
*cbor.SimpleValue
by @fxamacker in #461 - Fix cbor.SimpleValue encoding and decoding by @fxamacker in #464
- Fix EncOption/DecOption unset fields on mode regurgitation. by @benluddy in #480
📖 Docs and CI
- Update README for error handling of CBOR extraneous data by @fxamacker in #426
- Update README for changes in cbor v2.5.0 by @fxamacker in #427
- Update CI and README by @fxamacker in #430
- Update README to add FIDO Alliance, Let's Encrypt, Matrix.org by @fxamacker in #431
- Pin actions/checkout and actions/setup-go by @x448 in #436
- Enable more linters by @fxamacker in #437
- Bump github/codeql-action from 2.22.5 to 2.22.8 by @dependabot in #443
- Document behavior of Unmarshal of unrecognized tags into interface{} by @benluddy in #448
- Bump github/codeql-action from 2.22.8 to 3.22.12 by @dependabot in #455
- Bump github/codeql-action from 3.22.12 to 3.23.0 by @dependabot in #469
New Contributors
- @benluddy made their first contribution in #433
- @dinhxuanvu made their first contribution in #453
- @ssuriyan7 made their first contribution in #475
Full Changelog: v2.5.0...v2.6.0