Skip to content

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

Merged
antonmedv merged 6 commits into
expr-lang:masterfrom
diegommm:allow-ignoring-struct-member-with-struct-tag
Jun 30, 2025
Merged

Ignoring fields with struct tag expr:"-" and make "in" return false for unexported fields#806
antonmedv merged 6 commits into
expr-lang:masterfrom
diegommm:allow-ignoring-struct-member-with-struct-tag

Conversation

@diegommm

@diegommmdiegommm commented Jun 24, 2025

Copy link
Copy Markdown
Contributor

Fixes#805 and #807

Comment threadexpr_test.go

fmt.Printf("%v", output)

// Output : Hello World

Copy link
Copy Markdown
ContributorAuthor

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 threadexpr_test.go
Comment on lines -532 to +597
// Output: Hello, you, world!
// Output: Hello, you, world!

Copy link
Copy Markdown
ContributorAuthor

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.

Comment threadbuiltin/lib.go Outdated
Comment threadchecker/nature/utils.go Outdated
Comment threadchecker/nature/utils.go Outdated
Comment threadchecker/nature/utils.go Outdated
Comment threadvm/runtime/runtime.go Outdated
@diegommmdiegommm changed the title Allow ignoring struct fields with struct tag expr:"-"Ignoring fields with struct tag expr:"-" and make "in" return false for unexported fieldsJun 27, 2025
@diegommm
diegommm requested a review from antonmedvJune 27, 2025 20:23
@antonmedv
antonmedv merged commit 85d0be8 into expr-lang:masterJun 30, 2025
Sign up for freeto 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

@diegommm@antonmedv