type Result … // Merge merges this result with the other one(s), preserving match counts etc. func (r *Result) Merge(others ...*Result) *Result { … } // MergeAsErrors merges this result with the other one(s), preserving match counts etc. // // Warnings from input are merged as Errors in the returned merged Result. func (r *Result) MergeAsErrors(others ...*Result) *Result { … } // MergeAsWarnings merges this result with the other one(s), preserving match counts etc. // // Errors from input are merged as Warnings in the returned merged Result. func (r *Result) MergeAsWarnings(others ...*Result) *Result { … } // AddErrors adds errors to this validation result (if not already reported). // // Since the same check may be passed several times while exploring the // spec structure (via $ref, ...) reported messages are kept // unique. func (r *Result) AddErrors(errors ...error) { … } // AddWarnings adds warnings to this validation result (if not already reported). func (r *Result) AddWarnings(warnings ...error) { … } func (r *Result) keepRelevantErrors() *Result { … } // IsValid returns true when this result is valid. // // Returns true on a nil *Result. func (r *Result) IsValid() bool { … } // HasErrors returns true when this result is invalid. // // Returns false on a nil *Result. func (r *Result) HasErrors() bool { … } // HasWarnings returns true when this result contains warnings. // // Returns false on a nil *Result. func (r *Result) HasWarnings() bool { … } // HasErrorsOrWarnings returns true when this result contains // either errors or warnings. // // Returns false on a nil *Result. func (r *Result) HasErrorsOrWarnings() bool { … } // Inc increments the match count func (r *Result) Inc() { … } // AsError renders this result as an error interface // // TODO: reporting / pretty print with path ordered and indented func (r *Result) AsError() error { … }