mirror of
https://github.com/yannh/kubeconform.git
synced 2026-04-16 00:59:53 +00:00
refactor
This commit is contained in:
parent
1bc9283240
commit
0c22457919
2 changed files with 14 additions and 30 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue