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

Skip ignored private fields #61

Merged
merged 1 commit into from
Dec 7, 2024

Conversation

rafaelhl
Copy link
Contributor

@rafaelhl rafaelhl commented Oct 5, 2021

This pull request allows adding some private fields on properties structs without having problems, only marking this field as skipped with a specific tag as the test example below.:

	type S struct {
		p     string `properties:"-"`
		X     string `properties:"-"`
		Undef string `properties:",default=some value"`
	}

This change will avoid an error cannot set p using the struct above.

@rafaelhl
Copy link
Contributor Author

rafaelhl commented Oct 7, 2021

@magiconair Can you approve this PR? This change will turn more flexible the usage of the struct when we need to add some other internal fields.

@magiconair magiconair added this to the 1.8.9 milestone Dec 7, 2024
@magiconair magiconair merged commit d8bdba3 into magiconair:main Dec 7, 2024
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