Proposal Details
Level and LevelVar have UnmarshalText methods, but there no direct way to parse a string into a Level.
UnmarshalText is fine if the level is a flag, but not if it's, say, a query param. For that one has to write the awkward code:
slogLevel.UnmarshalText([]byte(r.FormValue("l"))
Add ParseLevel(string) (Level, error).
Proposal Details
Level and LevelVar have UnmarshalText methods, but there no direct way to parse a string into a Level.
UnmarshalText is fine if the level is a flag, but not if it's, say, a query param. For that one has to write the awkward code:
Add
ParseLevel(string) (Level, error).