MarshalText marshals the Level to text. Note that the text representation drops the -Level suffix (see example).
()
| 158 | // MarshalText marshals the Level to text. Note that the text representation |
| 159 | // drops the -Level suffix (see example). |
| 160 | func (l Level) MarshalText() ([]byte, error) { |
| 161 | return []byte(l.String()), nil |
| 162 | } |
| 163 | |
| 164 | // UnmarshalText unmarshals text to a level. Like MarshalText, UnmarshalText |
| 165 | // expects the text representation of a Level to drop the -Level suffix (see |