mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 05:57:25 +00:00
Prune trailing newlines when enums are disabled
This commit is contained in:
parent
d78de56d76
commit
d0967bbe5e
@ -68,7 +68,7 @@ func pruneEnums(schema *spec.Schema) *spec.Schema {
|
|||||||
// note that the new lines before the header should be removed too,
|
// note that the new lines before the header should be removed too,
|
||||||
// thus the slice range.
|
// thus the slice range.
|
||||||
clone()
|
clone()
|
||||||
schema.Description = schema.Description[:headerIndex]
|
schema.Description = strings.TrimSpace(schema.Description[:headerIndex])
|
||||||
}
|
}
|
||||||
if len(schema.Enum) != 0 {
|
if len(schema.Enum) != 0 {
|
||||||
// remove the enum field
|
// remove the enum field
|
||||||
|
Loading…
Reference in New Issue
Block a user