Skip to content

Commit a326346

Browse files
authoredFeb 20, 2025··
fix documentation templating bug (#570)
Description of changes: This PR fixes a templating issue where multi-line documentation strings were being truncated due to template whitespace control markers. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 8b426c4 commit a326346

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎templates/apis/crd.go.tpl

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ type {{ .CRD.Kind }}Spec struct {
2020
{{ $field.GetDocumentation }}
2121
{{ end -}}
2222

23-
{{- if $field.IsImmutable }}
23+
{{- if $field.IsImmutable -}}
2424
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable once set"
25-
{{- end }}
25+
{{ end -}}
2626

27-
{{- if and ($field.IsRequired) (not $field.HasReference) }}
27+
{{- if and ($field.IsRequired) (not $field.HasReference) -}}
2828
// +kubebuilder:validation:Required
29-
{{- end }}
29+
{{ end -}}
3030

3131
{{ $field.Names.Camel }} {{ $field.GoType }} {{ $field.GetGoTag }}
3232
{{- end }}

0 commit comments

Comments
 (0)
Please sign in to comment.