Skip to content

Commit 4866a29

Browse files
refactor: string concat instead of fmt.Sprint
1 parent e229c53 commit 4866a29

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

parser.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package parser
33

44
import (
55
"errors"
6-
"fmt"
76
"regexp"
87
"strings"
98
)
@@ -80,12 +79,12 @@ func Parse(message string) (*Commit, error) {
8079
currFooterValue = value
8180
} else {
8281
if inFooters {
83-
currFooterValue = fmt.Sprintf("%s\n%s", currFooterValue, msgLine)
82+
currFooterValue = currFooterValue + "\n" + msgLine
8483
} else {
8584
if commit.Body == "" {
8685
commit.Body = msgLine
8786
} else {
88-
commit.Body += fmt.Sprintf("\n%s", msgLine)
87+
commit.Body += "\n" + msgLine
8988
}
9089
}
9190
}

0 commit comments

Comments
 (0)