normalize lowercases and trims s for case-insensitive matching.
(s string)
| 38 | |
| 39 | // normalize lowercases and trims s for case-insensitive matching. |
| 40 | func normalize(s string) Level { |
| 41 | return Level(strings.ToLower(strings.TrimSpace(s))) |
| 42 | } |
| 43 | |
| 44 | // Parse normalises s (case-insensitive, trimmed) and returns the matching |
| 45 | // Level. It returns ("", false) for unknown strings, adaptive values, and |
no test coverage detected