Commit c19fa9f6 authored by tanshanshan's avatar tanshanshan

use elseif to replace if

parent 47a431e8
......@@ -283,8 +283,7 @@ func IsConfigMapKey(value string) []string {
}
if value == "." {
errs = append(errs, `must not be '.'`)
}
if value == ".." {
} else if value == ".." {
errs = append(errs, `must not be '..'`)
} else if strings.HasPrefix(value, "..") {
errs = append(errs, `must not start with '..'`)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment