Skip to content

Commit

Permalink
fixed linting error
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 8f595f8 commit e07a650
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions outputs/policyreport.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type pr struct {
const (
clusterPolicyReportBaseName = "falco-cluster-policy-report"
policyReportSource = "Falco"
highpri = "high"
)

var (
Expand Down Expand Up @@ -93,7 +94,7 @@ func newResult(FalcoPayload types.FalcoPayload) (c *wgpolicy.PolicyReportResult,
}
var pri string //initial hardcoded priority bounds
if FalcoPayload.Priority > types.PriorityType(failbound) {
pri = "high"
pri = highpri
} else if FalcoPayload.Priority < types.PriorityType(failbound) {
pri = "low"
} else {
Expand Down Expand Up @@ -133,7 +134,7 @@ func repexist(ns string) int {

//update summary for clusterpolicyreport 'report'
func updateClusterSummary(r *wgpolicy.PolicyReportResult) {
if r.Severity == "high" {
if r.Severity == highpri {
report.Summary.Fail++
} else {
report.Summary.Warn++
Expand All @@ -142,7 +143,7 @@ func updateClusterSummary(r *wgpolicy.PolicyReportResult) {

//update summary for specific policyreport in 'polreports' at index 'n'
func updatePolicyReportSummary(n int, r *wgpolicy.PolicyReportResult) {
if r.Severity == "high" {
if r.Severity == highpri {
polreports[n].report.Summary.Fail++
} else {
polreports[n].report.Summary.Warn++
Expand Down

0 comments on commit e07a650

Please sign in to comment.