-
Notifications
You must be signed in to change notification settings - Fork 48
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
Prevent validation on custom structs for nil values #147
Comments
Validation `nonzero` is broken with latest beats update. Temporarily implement validation instead of using validation tags until elastic/go-ucfg#147 is fixed.
Would it make sense to use |
Not really, the value is not required, but if given it is not allowed to be zero, basically exactly what I would expect from |
@simitt You are correct, the issue is with the latest changes the |
Validation `nonzero` is broken with latest beats update. Temporarily implement validation instead of using validation tags until elastic/go-ucfg#147 is fixed.
Validation `nonzero` is broken with latest beats update. Temporarily implement validation instead of using validation tags until elastic/go-ucfg#147 is fixed. backports commit f604f27
* Remove non-existing config option * Tmp validation fix for self instrumentation cfg Validation `nonzero` is broken with latest beats update. Temporarily implement validation instead of using validation tags until elastic/go-ucfg#147 is fixed. backports commit f604f27
According to https://github.com/elastic/go-ucfg/blob/master/validator.go#L213, the validation tag
nonzero
should only return an error if the configuration value is present but zero.For custom types this is not always the case at the moment.
Eg. have following custom type and configuration raises an error even if the
hosts
field is not present:The text was updated successfully, but these errors were encountered: