use elseif to replace if

pull/6/head
tanshanshan 2016-11-17 17:13:17 +08:00
parent 47a431e82f
commit c19fa9f60e
1 changed files with 1 additions and 2 deletions

View File

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