mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Document that endpoints is only plural in resource aliases
This commit is contained in:
parent
02611149c1
commit
b5b76d8187
@ -161,7 +161,8 @@ func ResourceAliases(rs []string) []string {
|
|||||||
var plural string
|
var plural string
|
||||||
switch {
|
switch {
|
||||||
case r == "endpoints":
|
case r == "endpoints":
|
||||||
plural = r // exception. "endpoint" does not exist. Why?
|
// Endpoints type itself is plural, unlike every other resource.
|
||||||
|
plural = r
|
||||||
case strings.HasSuffix(r, "y"):
|
case strings.HasSuffix(r, "y"):
|
||||||
plural = r[0:len(r)-1] + "ies"
|
plural = r[0:len(r)-1] + "ies"
|
||||||
case strings.HasSuffix(r, "s"):
|
case strings.HasSuffix(r, "s"):
|
||||||
|
Loading…
Reference in New Issue
Block a user