File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,6 +44,9 @@ func Format(template string, args ...any) string {
4444 if template [i ] == '{' {
4545 // possibly it is a template placeholder
4646 if i == templateLen - 1 {
47+ // if we gave { at the end of line i.e. -> type serviceHealth struct {,
48+ // without this write we got type serviceHealth struct
49+ formattedStr .WriteByte ('{' )
4750 break
4851 }
4952 // considering in 2 phases - {{ }}
@@ -156,6 +159,9 @@ func FormatComplex(template string, args map[string]any) string {
156159 if template [i ] == '{' {
157160 // possibly it is a template placeholder
158161 if i == templateLen - 1 {
162+ // if we gave { at the end of line i.e. -> type serviceHealth struct {,
163+ // without this write we got type serviceHealth struct
164+ formattedStr .WriteByte ('{' )
159165 break
160166 }
161167
You can’t perform that action at this time.
0 commit comments