github.com/Serizao/go-winio@v0.0.0-20230906082528-f02f7f4ad6e8/pkg/etw/level_string.go (about) 1 // Code generated by "stringer -type=Level -trimprefix=Level"; DO NOT EDIT. 2 3 package etw 4 5 import "strconv" 6 7 func _() { 8 // An "invalid array index" compiler error signifies that the constant values have changed. 9 // Re-run the stringer command to generate them again. 10 var x [1]struct{} 11 _ = x[LevelAlways-0] 12 _ = x[LevelCritical-1] 13 _ = x[LevelError-2] 14 _ = x[LevelWarning-3] 15 _ = x[LevelInfo-4] 16 _ = x[LevelVerbose-5] 17 } 18 19 const _Level_name = "AlwaysCriticalErrorWarningInfoVerbose" 20 21 var _Level_index = [...]uint8{0, 6, 14, 19, 26, 30, 37} 22 23 func (i Level) String() string { 24 if i >= Level(len(_Level_index)-1) { 25 return "Level(" + strconv.FormatInt(int64(i), 10) + ")" 26 } 27 return _Level_name[_Level_index[i]:_Level_index[i+1]] 28 }