Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Commit d02c17d

Browse files
authored
refactor: fix quote func (#53)
2 parents f347d06 + 612fe73 commit d02c17d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

internal/arcgen/lang/util/quote.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,13 @@ func JoinStringsWithQuote(ss []string, sep string, quote string) string {
1717
return QuoteString(ss[0], quote)
1818
}
1919

20-
return quote + strings.Join(ss, quote+sep+quote) + quote
20+
var builder strings.Builder
21+
for i, s := range ss {
22+
if i > 0 {
23+
builder.WriteString(sep)
24+
}
25+
builder.WriteString(QuoteString(s, quote))
26+
}
27+
28+
return builder.String()
2129
}

0 commit comments

Comments
 (0)