func (e *Escalation) SetEscalation(status int, prev, cur string) {
	e.Status = status
	e.StatusMessage = getEscalatedStatus(status)
	e.Previous = prev
	e.Current = cur
}
SetEscalation set escalation status
package types
import (
	"github.com/sysdiglabs/kube-psp-advisor/utils"
)
const (
	Reduced   = -1
	NoChange  = 0
	Escalated = 1
)
var (
	m = map[int]string{
		Reduced:   "Reduced",
		NoChange:  "No Change",
		Escalated: "Escalated",
	}
)
const (
	root    = "root"
	nonRoot = "non-root"
)
type LintReport struct {
	TotalSourceWorkloads  int                    `json:"total_source_workloads"`
	TotalTargetWorkloads  int                    `json:"total_target_workloads"`
	TotalSourceImages     int                    `json:"total_source_images"`
	TotalTargetImages     int                    `json:"total_target_images"`
	TotalEscalation       int                    `json:"escalation_count"`
	TotalReduction        int                    `json:"reduction_count"`
	Escalations           []Metadata             `json:"escalations"`
	Reductions            []Metadata             `json:"reductions"`
	NewPrivileged         *Escalation            `json:"new_privileged"`
	RemovedPrivileged     *Escalation            `json:"removed_privileged"`
	NewHostIPC            *Escalation            `json:"new_hostIPC"`
	RemovedHostIPC        *Escalation            `json:"removed_hostIPC"`
	NewHostNetwork        *Escalation            `json:"new_hostNetwork"`
	RemovedHostNetwork    *Escalation            `json:"removed_hostNetwork"`
	NewHostPID            *Escalation            `json:"new_hostPID"`
	RemovedHostPID        *Escalation            `json:"removed_hostPID"`
	NewHostPaths          map[string]bool        `json:"-"`
	RemovedHostPaths      map[string]bool        `json:"-"`
	NewVolumeTypes        map[string]*Escalation `json:"new_volume_types"`
	RemovedVolumeTypes    map[string]*Escalation `json:"removed_volume_types"`
	NewCapabilities       map[string]*Escalation `json:"new_capabilities"`
	RemovedCapabilities   map[string]*Escalation `json:"reduced_capabilities"`
	NewRunUserAsRoot      *Escalation            `json:"new_run_user_as_root"`
	RemovedRunUserAsRoot  *Escalation            `json:"removed_run_user_as_root"`
	NewRunGroupAsRoot     *Escalation            `json:"new_run_group_as_root"`
	RemovedRunGroupAsRoot *Escalation            `json:"removed_run_group_as_root"`
	NewReadOnlyRootFS     *Escalation            `json:"new_read_only_root_fs"`
	RemovedReadOnlyRootFS *Escalation            `json:"removed_read_only_root_fs"`
}
type Escalation struct {
	Status        int               `json:"-"`
	StatusMessage string            `json:"status"`
	Previous      string            `json:"previous"`
	Current       string            `json:"current"`
	Workloads     []Metadata        `json:"workloads"`
	WorkloadCount int               `json:"workloads_count"`
	workloadMap   map[Metadata]bool `json:"-"`
}
func InitEscalation(status int, prev, cur string) *Escalation {
	return &Escalation{
		Status:        status,
		StatusMessage: getEscalatedStatus(status),
		Previous:      prev,
		Current:       cur,
		Workloads:     []Metadata{},
		workloadMap:   map[Metadata]bool{},
	}
}