var requiredErr … // TODO: deduplicate against PolicyToEvaluate func ToPolicy(defaults PodSecurityDefaults) (policyapi.Policy, error) { … } // appendErr is a helper function to collect field-specific errors. func appendErr(errs []error, err error, field string) []error { … }