Skip to content

feature: Shorthand encmode/decode functions for predefined encoding options #214

Open
@e3b0c442

Description

@e3b0c442

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions