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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rafaelhl
Copy link

@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
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.

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.

None yet

1 participant