Skip to content

feat: peek/modify decoded unknown fields  #46

@ii64

Description

@ii64

Is your feature request related to a problem? Please describe.

We've got CarryingUnknownFields to see if there's unknown fields, but what we could do with it besides reflecting them back to wire data? Currently, _unknownFields is not exported, and no methods expose it. So technically, there's no way to touch them without going to unsafe.

Describe the solution you'd like, and alternatives you've considered

Expose _unknownFields field, or provide a method to expose it.
In addition, since field ids can be unordered, implement new method on type unknown.Fields to find the field id and field type, or matcher that calls back whether there's matched field id and field type.

Additional context

No additional context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions