mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 09:49:50 +00:00
use elseif to replace if
This commit is contained in:
parent
47a431e82f
commit
c19fa9f60e
@ -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 '..'`)
|
||||||
|
Loading…
Reference in New Issue
Block a user