Skip to content

Ignoring fields with struct tag expr:"-" and make "in" return false for unexported fields #806

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

diegommm
Copy link

@diegommm diegommm commented Jun 24, 2025

Fixes #805 and #807

@@ -139,7 +140,71 @@ func ExampleEnv_tagged_field_names() {

fmt.Printf("%v", output)

// Output : Hello World
Copy link
Author

Choose a reason for hiding this comment

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

This is unrelated but I realized that this example test was not being run because there is a space between Output and :, so I removed the space and the example test is now running and is successful.

Comment on lines -532 to +597
// Output : Hello, you, world!
// Output: Hello, you, world!
Copy link
Author

Choose a reason for hiding this comment

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

Same as above: this is unrelated but I realized that this example test was not being run because there is a space between Output and :, so I removed the space and the example test is now running and is successful.

@diegommm diegommm changed the title Allow ignoring struct fields with struct tag expr:"-" Ignoring fields with struct tag expr:"-" and make "in" return false for unexported fields Jun 27, 2025
@diegommm diegommm requested a review from antonmedv June 27, 2025 20:23
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.

Feature request: allow ignoring struct fields with struct tag expr:"-"
2 participants