MCPcopy Index your code
hub / github.com/DoNewsCode/core / isValidLevel

Function isValidLevel

helper.go:60–68  ·  view source on GitHub ↗

isValidLevel tests if the given input is valid level config.

(levelCfg string)

Source from the content-addressed store, hash-verified

58
59// isValidLevel tests if the given input is valid level config.
60func 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.
71func isValidFormat(format string) bool {

Callers 1

provideDefaultConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected