github.com/bibaroc/wingman@v0.0.2-0.20200911182922-33c2085136b1/pkg/logger/loglevel_string.go (about) 1 // Code generated by "stringer -linecomment -type LogLevel ./pkg/logger"; DO NOT EDIT. 2 3 package logger 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[FATAL-0] 12 _ = x[ERROR-1] 13 _ = x[WARNING-2] 14 _ = x[INFO-3] 15 _ = x[DEBUG-4] 16 _ = x[TRACE-5] 17 } 18 19 const _LogLevel_name = "[FATA][ERRO][WARN][INFO][DEBU][TRAC]" 20 21 var _LogLevel_index = [...]uint8{0, 6, 12, 18, 24, 30, 36} 22 23 func (i LogLevel) String() string { 24 if i < 0 || i >= LogLevel(len(_LogLevel_index)-1) { 25 return "LogLevel(" + strconv.FormatInt(int64(i), 10) + ")" 26 } 27 return _LogLevel_name[_LogLevel_index[i]:_LogLevel_index[i+1]] 28 }