isValidLevel tests if the given input is valid level config.
(levelCfg string)
| 58 | |
| 59 | // isValidLevel tests if the given input is valid level config. |
| 60 | func isValidLevel(levelCfg string) bool { |
| 61 | validLevel := []string{"debug", "info", "warn", "error", "none"} |
| 62 | for i := range validLevel { |
| 63 | if validLevel[i] == levelCfg { |
| 64 | return true |
| 65 | } |
| 66 | } |
| 67 | return false |
| 68 | } |
| 69 | |
| 70 | // isValidLevel tests if the given input is valid format config. |
| 71 | func isValidFormat(format string) bool { |
no outgoing calls
no test coverage detected