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

Refactor config Unmarshal methods. #271

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PurelyApplied
Copy link
Collaborator

  • Use json.RawMessage to clean logic distinguishing literal and regexp matchers
  • Add tag validation that both key and value are set.

Fixes #<issue_number_goes_here>

It's a good idea to open an issue first for discussion.

  • Running against a large codebase such as Kubernetes does not error out. (See DEVELOPING.md for instructions on how to do that.)
  • Appropriate changes to README are included in PR

* Use json.RawMessage to clean logic distinguishing literal and regexp matchers
* Add tag validation that both key and value are set.
}
ft.Key = val
case "val", "value":
if ft.Key != "" {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Obvious typo

Comment on lines +188 to +190
s.Package = vacuousMatcher{}
s.Type = vacuousMatcher{}
s.Field = vacuousMatcher{}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Might read better as = nil, use != nil checks below, and update nil to vacuous during final validation. But it's a draft.

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.

1 participant