diff options
| author | Fuwn <[email protected]> | 2026-02-05 10:39:59 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-02-05 10:39:59 +0000 |
| commit | 77bbef01943a604fc09e9a422126154988846289 (patch) | |
| tree | 81eb1946475177b82d34e37af48ecfae2d0fa4ca /formatter.go | |
| parent | feat(formatter): Dispatch adapter by file extension for multi-language support (diff) | |
| download | iku-77bbef01943a604fc09e9a422126154988846289.tar.xz iku-77bbef01943a604fc09e9a422126154988846289.zip | |
perf: Reduce allocations and syscalls in formatting pipeline
Diffstat (limited to 'formatter.go')
| -rw-r--r-- | formatter.go | 2 |
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) { |