Skip to content

Commit

Permalink
fix(refacto): added missing function addchecks
Browse files Browse the repository at this point in the history
  • Loading branch information
StanGirard committed Apr 14, 2023
1 parent 7f3b12a commit 30b3afc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions plugins/commons/yatas.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ func CheckResources(checkConfig CheckConfig, resources []Resource, checkDefiniti
}
}

func AddChecks(checkConfig *CheckConfig, resources ...[]CheckDefinition) {
//Print the resources to check
totalCount := 0
for _, resourceSlice := range resources {
totalCount += len(resourceSlice)
}
checkConfig.Wg.Add(totalCount)
}

func createCheck(checkDefinition CheckDefinition) Check {
var check Check
check.InitCheck(checkDefinition.Description, checkDefinition.Description, checkDefinition.Title, checkDefinition.Categories)
Expand Down

0 comments on commit 30b3afc

Please sign in to comment.