Commit c19fa9f6 authored by tanshanshan's avatar tanshanshan

use elseif to replace if

parent 47a431e8
...@@ -283,8 +283,7 @@ func IsConfigMapKey(value string) []string { ...@@ -283,8 +283,7 @@ func IsConfigMapKey(value string) []string {
} }
if value == "." { if value == "." {
errs = append(errs, `must not be '.'`) errs = append(errs, `must not be '.'`)
} } else if value == ".." {
if value == ".." {
errs = append(errs, `must not be '..'`) errs = append(errs, `must not be '..'`)
} else if strings.HasPrefix(value, "..") { } else if strings.HasPrefix(value, "..") {
errs = append(errs, `must not start with '..'`) 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