aboutsummaryrefslogtreecommitdiff
path: root/formatter.go
diff options
context:
space:
mode:
Diffstat (limited to 'formatter.go')
-rw-r--r--formatter.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/formatter.go b/formatter.go
index 0256694..a82d619 100644
--- a/formatter.go
+++ b/formatter.go
@@ -14,7 +14,8 @@ const (
)
type Formatter struct {
- CommentMode CommentMode
+ CommentMode CommentMode
+ Configuration Configuration
}
type lineInformation struct {
@@ -31,7 +32,10 @@ func (f *Formatter) Format(source []byte, filename string) ([]byte, error) {
return nil, err
}
- formattingEngine := &engine.Engine{CommentMode: MapCommentMode(f.CommentMode)}
+ formattingEngine := &engine.Engine{
+ CommentMode: MapCommentMode(f.CommentMode),
+ GroupSingleLineScopes: f.Configuration.GroupSingleLineFunctions,
+ }
return formattingEngine.FormatToBytes(events), nil
}