From 784c901541ed7eedbdc3426e52056c4bf1070a04 Mon Sep 17 00:00:00 2001 From: HeyJavaBean Date: Mon, 1 Apr 2024 17:58:07 +0800 Subject: [PATCH] fix: fix enum dump --- tool/trimmer/dump/field_template.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/trimmer/dump/field_template.go b/tool/trimmer/dump/field_template.go index 0640f5e3..7ba25c18 100644 --- a/tool/trimmer/dump/field_template.go +++ b/tool/trimmer/dump/field_template.go @@ -86,7 +86,7 @@ const EnumTemplate = ` {{- if .ReservedComments -}}{{- ReplaceQuotes .ReservedComments -}}{{"\n"}}{{- end -}} {{- "enum"}} {{.Name}} { {{- range .Values}} - {{- if .ReservedComments -}}{{- ReplaceQuotes .ReservedComments -}}{{- end}} + {{ if .ReservedComments }}{{ ReplaceQuotes .ReservedComments }}{{end}} {{.Name}} = {{.Value}} {{template "Annotations" .Annotations -}} {{- end}} } {{template "Annotations" .Annotations -}}{{"\n"}}