Created
May 10, 2024 19:09
-
-
Save ffalor/fb55af8bac245c113dd82b1ace7adf1d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mlSliderLevels = []string{"DISABLED", "CAUTIOUS", "MODERATE", "AGGRESSIVE", "EXTRA_AGGRESSIVE"} | |
var mapMlSliderLevels = map[string]int{ | |
"DISABLED": 0, | |
"CAUTIOUS": 1, | |
"MODERATE": 2, | |
"AGGRESSIVE": 3, | |
"EXTRA_AGGRESSIVE": 4, | |
} | |
detectionLevel := slider.Detection.String() | |
preventionLevel := slider.Prevention.String() | |
panic( | |
fmt.Sprintf( | |
"attr: %s detectionLevel: %s %d, preventionLevel: %s %d", | |
attribute, | |
detectionLevel, | |
mapMlSliderLevels[detectionLevel], | |
preventionLevel, | |
mapMlSliderLevels[preventionLevel], | |
), | |
) | |
panic: attr: cloud_anti_malware_microsoft_office_files detectionLevel: "CAUTIOUS" 0, preventionLevel: "MODERATE" 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment