aboutsummaryrefslogtreecommitdiff
path: root/formatter.go
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-02-05 10:39:59 +0000
committerFuwn <[email protected]>2026-02-05 10:39:59 +0000
commit77bbef01943a604fc09e9a422126154988846289 (patch)
tree81eb1946475177b82d34e37af48ecfae2d0fa4ca /formatter.go
parentfeat(formatter): Dispatch adapter by file extension for multi-language support (diff)
downloadiku-77bbef01943a604fc09e9a422126154988846289.tar.xz
iku-77bbef01943a604fc09e9a422126154988846289.zip
perf: Reduce allocations and syscalls in formatting pipeline
Diffstat (limited to 'formatter.go')
-rw-r--r--formatter.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/formatter.go b/formatter.go
index 3d4e873..0256694 100644
--- a/formatter.go
+++ b/formatter.go
@@ -33,7 +33,7 @@ func (f *Formatter) Format(source []byte, filename string) ([]byte, error) {
formattingEngine := &engine.Engine{CommentMode: MapCommentMode(f.CommentMode)}
- return []byte(formattingEngine.FormatToString(events)), nil
+ return formattingEngine.FormatToBytes(events), nil
}
func analyzeSource(source []byte, filename string) ([]byte, []engine.LineEvent, error) {