use elseif to replace if

This commit is contained in:
tanshanshan 2016-11-17 17:13:17 +08:00
parent 47a431e82f
commit c19fa9f60e

View File

@ -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 '..'`)