This commit is contained in:
Yann Hamon 2020-11-01 16:35:38 +01:00
parent 1bc9283240
commit 0c22457919
2 changed files with 14 additions and 30 deletions

View file

@ -43,6 +43,14 @@ type Result struct {
Status Status
}
func NewError(filename string, err error) Result {
return Result{
Resource: resource.Resource{Path: filename},
Err: err,
Status: Error,
}
}
// Validate validates a single Kubernetes resource against a Json Schema
func Validate(res resource.Resource, schema *gojsonschema.Schema) Result {
if schema == nil {