mirror of
https://github.com/yannh/kubeconform.git
synced 2026-04-11 23:44:16 +00:00
only expose interfac
This commit is contained in:
parent
9d91ec4aa9
commit
4672ded043
3 changed files with 57 additions and 72 deletions
|
|
@ -90,7 +90,7 @@ func realMain() int {
|
|||
wg := sync.WaitGroup{}
|
||||
for i := 0; i < cfg.NumberOfWorkers; i++ {
|
||||
wg.Add(1)
|
||||
go func(resources <-chan resource.Resource, validationResults chan<- validator.Result, v *validator.Validator) {
|
||||
go func(resources <-chan resource.Resource, validationResults chan<- validator.Result, v validator.Validator) {
|
||||
for res := range resources {
|
||||
validationResults <- v.Validate(res)
|
||||
}
|
||||
|
|
@ -106,7 +106,11 @@ func realMain() int {
|
|||
}
|
||||
|
||||
if err, ok := err.(resource.DiscoveryError); ok {
|
||||
validationResults <- validator.NewError(err.Path, err.Err)
|
||||
validationResults <- validator.Result{
|
||||
Resource: resource.Resource{Path: err.Path},
|
||||
Err: err.Err,
|
||||
Status: validator.Error,
|
||||
}
|
||||
ctx.Done()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue