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

Add KnownFields() #1008

Open
wants to merge 3 commits into
base: v3
Choose a base branch
from
Open

Add KnownFields() #1008

wants to merge 3 commits into from

Conversation

fornellas
Copy link

I've been missing the ability to detect when there are alien fields when decoding. This PR exposes such interface, and add some tests.

@jcrqr
Copy link

jcrqr commented May 29, 2024

This would fix #460 and looks like a fairly simple implementation that aligns with the way yaml.NewDecoder(r).KnownFields(true) works.

Could we get this merge @niemeyer?

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.

2 participants