Some checks failed
continuous-integration/drone/push Build is failing
- add TextUnmarshaler - add TextMarshaler - update json.Marshaler - update json.Unmarshaler - update string name Emergency and Critical - add test json Unmarshaler and Marshaler Reviewed-on: #7 Co-authored-by: andrey <andrey@4devs.io> Co-committed-by: andrey <andrey@4devs.io>
31 lines
743 B
Go
31 lines
743 B
Go
// Code generated by "stringer -type=Level -linecomment"; DO NOT EDIT.
|
|
|
|
package level
|
|
|
|
import "strconv"
|
|
|
|
func _() {
|
|
// An "invalid array index" compiler error signifies that the constant values have changed.
|
|
// Re-run the stringer command to generate them again.
|
|
var x [1]struct{}
|
|
_ = x[Emergency-0]
|
|
_ = x[Alert-1]
|
|
_ = x[Critical-2]
|
|
_ = x[Error-3]
|
|
_ = x[Warning-4]
|
|
_ = x[Notice-5]
|
|
_ = x[Info-6]
|
|
_ = x[Debug-7]
|
|
}
|
|
|
|
const _Level_name = "emergalertcriterrorwarningnoticeinfodebug"
|
|
|
|
var _Level_index = [...]uint8{0, 5, 10, 14, 19, 26, 32, 36, 41}
|
|
|
|
func (i Level) String() string {
|
|
if i >= Level(len(_Level_index)-1) {
|
|
return "Level(" + strconv.FormatInt(int64(i), 10) + ")"
|
|
}
|
|
return _Level_name[_Level_index[i]:_Level_index[i+1]]
|
|
}
|