update level (#7)
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>
This commit was merged in pull request #7.
This commit is contained in:
2024-01-01 17:00:37 +03:00
parent 45d51e4825
commit a3091c4eb6
3 changed files with 100 additions and 25 deletions

View File

@@ -18,9 +18,9 @@ func _() {
_ = x[Debug-7]
}
const _Level_name = "emergencyalertcriticalerrorwarningnoticeinfodebug"
const _Level_name = "emergalertcriterrorwarningnoticeinfodebug"
var _Level_index = [...]uint8{0, 9, 14, 22, 27, 34, 40, 44, 49}
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) {