optimize the code of the command line (#3614)

This commit is contained in:
fatedier
2023-09-15 10:33:32 +08:00
committed by GitHub
parent 74255f711e
commit bae0b4d7c0
41 changed files with 566 additions and 1363 deletions

View File

@@ -44,8 +44,8 @@ func ValidatePort(port int, fieldPath string) error {
}
func validateLogConfig(c *v1.LogConfig) error {
if !lo.Contains(supportedLogLevels, c.Level) {
return fmt.Errorf("invalid log level, optional values are %v", supportedLogLevels)
if !lo.Contains(SupportedLogLevels, c.Level) {
return fmt.Errorf("invalid log level, optional values are %v", SupportedLogLevels)
}
return nil
}