Skip to content

Commit

Permalink
fixing variable name
Browse files Browse the repository at this point in the history
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
  • Loading branch information
anushkamittal20 authored and poiana committed Jan 21, 2022
1 parent 737ac7c commit 128f60d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions outputs/policyreport.go
Expand Up @@ -25,6 +25,8 @@ const (
highpriority = "high"
lowpriority = "low"
mediumpriority = "medium"
fail = "fail"
warn = "warn"
)

var (
Expand Down Expand Up @@ -107,13 +109,13 @@ func newResult(FalcoPayload types.FalcoPayload) (_ *wgpolicy.PolicyReportResult,
}
if FalcoPayload.Priority > types.Priority(minimumPriority) {
severity = highpriority
result = "fail"
result = fail
} else if FalcoPayload.Priority < types.Priority(minimumPriority) {
severity = lowpriority
result = "warn"
result = warn
} else {
severity = mediumpriority
result = "warn"
result = warn
}

return &wgpolicy.PolicyReportResult{
Expand Down Expand Up @@ -141,7 +143,7 @@ func checklow(result []*wgpolicy.PolicyReportResult) (swapint int) {

//update summary for clusterpolicyreport 'report'
func updateClusterPolicyReportSummary(event *wgpolicy.PolicyReportResult) {
if event.Result == "fail" {
if event.Result == fail {
clusterPolicyReport.Summary.Fail++
} else {
clusterPolicyReport.Summary.Warn++
Expand All @@ -150,7 +152,7 @@ func updateClusterPolicyReportSummary(event *wgpolicy.PolicyReportResult) {

//update summary for specific policyreport in 'policyReports' at index 'n'
func updatePolicyReportSummary(rep *wgpolicy.PolicyReport, event *wgpolicy.PolicyReportResult) {
if event.Result == "fail" {
if event.Result == fail {
rep.Summary.Fail++
} else {
rep.Summary.Warn++
Expand Down

0 comments on commit 128f60d

Please sign in to comment.