Revert "TextMarshaler and TextUnmarshaler implementation for Level"

This commit is contained in:
Simon Eskildsen
2015-10-05 07:45:58 -04:00
parent 5a15866bba
commit 4197a1bbd5
2 changed files with 0 additions and 58 deletions
-18
View File
@@ -31,24 +31,6 @@ func (level Level) String() string {
return "unknown"
}
// UnmarshalText decodes text to the level.
func (level *Level) UnmarshalText(text []byte) error {
if len(text) == 0 {
return nil
}
parsed, err := ParseLevel(string(text))
if err != nil {
return err
}
*level = parsed
return nil
}
// MarshalText encodes the level into UTF-8-encoded text and returns the result.
func (level Level) MarshalText() (text []byte, err error) {
return []byte(level.String()), nil
}
// ParseLevel takes a string level and returns the Logrus log level constant.
func ParseLevel(lvl string) (Level, error) {
switch lvl {