Open
Description
Is your feature request related to a problem? Please describe.
Seeing a bunch of em, _ := cbor.CTAP2EncOptions().EncMode()
is a bit of a code smell (at least to me)
Describe the solution you'd like
Given that these predefined options would ostensibly never error, provide similar predefined encoding/decoding modes that can be used inline à la json.NewEncoder(blah)...
.
Example:
cbor.CTAP2EncMode().Marshal(&obj)
Describe alternatives you've considered
- continuing as described above
- creating my own shorthand function in my library
Additional context
n/a, this is just a suggested API improvement