Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client/setec: allow struct fields that implement UnmarshalBinary #101

Merged
merged 2 commits into from
Feb 27, 2024

Conversation

creachadair
Copy link
Member

@creachadair creachadair commented Feb 19, 2024

In addition to the existing supported types, allow fields whose pointer
implements the encoding.BinaryUnmarshaler interface to receive secret values
via their UnmarshalBinary method.

This may be used to handle structured binary values, or to perform basic
validation on the secret value (e.g., the implementation can report an error if
the value is invalid, but otherwise copy it).

Copy link
Member

@danderson danderson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me. No strong feelings on which flavor of unmarshaller to support (all of them? 😁 )

@creachadair creachadair changed the title client/setec: allow struct fields that implement UnmarshalText client/setec: allow struct fields that implement UnmarshalBinary Feb 26, 2024
In addition to the existing supported types, allow fields whose pointer
implements the encoding.BinaryUnmarshaler interface to receive secret values
via their UnmarshalBinary method.
@creachadair creachadair merged commit 0a60df9 into main Feb 27, 2024
1 of 2 checks passed
@creachadair creachadair deleted the mjf/textfield branch February 27, 2024 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants