v2.7.0-beta
Pre-release
Pre-release
What's Changed
Latest changes (among many) include cbor.MarshalToBuffer()
and UserBufferEncMode
interface to support user specified buffer (alternative to built-in buffer pool). This was going to be a release candidate but recent improvements (June 9, 2024) needs fuzzing, etc.
Special thanks to @benluddy for contributing features, optimizations, improvements, bug fixes, and discussions! 👍
⭐ Features and Optimizations
- Add decoding option TimeTagToAny to produce RFC3339 when decoding time into interface{} by @ssuriyan7 in #506
- Bypass sorting overhead for single-entry maps. by @benluddy in #516
- Add decode option to allow rejecting inputs that contain certain simple values. by @benluddy in #481
- Allow rejection of NaN and Inf float values on encode and decode. by @benluddy in #513
- Add SortMode to encode struct fields in a less predictable order. by @benluddy in #515
- Add a decoding option to allow decoding byte string into time.Time. by @benluddy in #524
- Encode structs directly to output buffer. by @benluddy in #519
- Support automatic conversion between text and binary string representations by @benluddy in #476
- Add a method for marshaling directly into a user-provided buffer. by @benluddy in #521
- Add options to disable BinaryMarshaler/BinaryUnmarshaler support. by @benluddy in #526
- Add option to reject decoding bignum tags and encoding big.Int. by @benluddy in #527
- Improve speed & memory use for Diagnose() and DiagnoseFirst() by @benluddy in #533
- Refactor sorted map encode to use fewer buffers for nested maps. by @benluddy in #537
- Allow user to specify buffer by adding
cbor.MarshalToBuffer()
,UserBufferEncMode
interface, etc. by @fxamacker in #553
🛠 Improvements
Improvements focused on fixing or updating new features. For bug fixes to features that were already released, see 🐞 Bug Fixes.
- Refactor to reuse functions and improve code coverage by @fxamacker in #531
- Fix invalid RFC 3339 in TimeTagToAny (unreleased new feature) by @benluddy in #540
- Refactor and improve code by @fxamacker in #542
- Use "cbor:" prefixed error msg when decoding with non-default TimeTagToAnyMode setting by @fxamacker in #544
- Disable conflicting encode options when marshaling cbor.Tag. by @benluddy in #546
- Improve byte string format decoding options by @fxamacker in #550
- Replace
*errors.errorString
withInadmissibleTagContentTypeError
by @fxamacker in #552 - Rename ByteSliceMode to ByteSliceLaterFormatMode, etc by @fxamacker in #554
🐞 Bug Fixes
- Check well-formedness of data from MarshalCBOR by @fxamacker in #485
- Treat map keys matching the same struct field as duplicates. by @benluddy in #492
- Decouple time.Time parsing from empty interface behavior. by @benluddy in #503
Other changes
Details
- Bump govulncheck from v1.0.1 to v1.0.4 by @fxamacker in #493
- Remove OpenSSF Scorecard until scorecard bug is fixed by @x448 in #495
- Bump github/codeql-action from 3.24.0 to 3.24.5 by @dependabot in #498
- Bump github/codeql-action from 3.24.5 to 3.24.6 by @dependabot in #502
- Enable more linters in .golangci.yml by @fxamacker in #504
- Bump actions/checkout from 4.1.1 to 4.1.2 by @dependabot in #509
- Bump github/codeql-action from 3.24.6 to 3.24.7 by @dependabot in #510
- Bump github/codeql-action from 3.24.7 to 3.24.9 by @dependabot in #511
- Bump github/codeql-action from 3.24.9 to 3.24.10 by @dependabot in #518
- Bump actions/checkout from 4.1.2 to 4.1.3 by @dependabot in #522
- Bump github/codeql-action from 3.24.10 to 3.25.1 by @dependabot in #523
- Bump github/codeql-action from 3.25.1 to 3.25.3 by @dependabot in #529
- Bump actions/checkout from 4.1.3 to 4.1.4 by @dependabot in #530
- Bump actions/setup-go from 4.1.0 to 5.0.1 by @dependabot in #532
- Bump github/codeql-action from 3.25.3 to 3.25.4 by @dependabot in #534
- Bump actions/checkout from 4.1.4 to 4.1.5 by @dependabot in #535
- Bump actions/checkout from 4.1.5 to 4.1.6 by @dependabot in #538
- Bump github/codeql-action from 3.25.4 to 3.25.5 by @dependabot in #539
- Bump golangci-lint from 1.53.3 to 1.54.2 by @fxamacker in #543
- Bump github/codeql-action from 3.25.5 to 3.25.6 by @dependabot in #541
- Bump github/codeql-action from 3.25.6 to 3.25.7 by @dependabot in #547
- Bump golangci-lint to 1.56.2 by @fxamacker in #548
Full Changelog
Full Changelog: v2.6.0...v2.7.0-beta