Skip to content

Commit d7d373e

Browse files
authored
Merge pull request #17 from tucksaun/fix-lint
fix linting issues
2 parents 5d66f02 + bcaca86 commit d7d373e

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

block.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@ func FormatBlockMessage(format string, msg string) string {
3333
lines, maxLen := splitsBlockLines(msg, width-4) // 2 spaces on the left, 2 on the right
3434
fullPadding := strings.Repeat(" ", maxLen+4)
3535

36-
buf.WriteString(fmt.Sprintf("<%s>", format))
36+
fmt.Fprintf(&buf, "<%s>", format)
3737
buf.WriteString(fullPadding)
3838
buf.WriteString("</>\n")
3939
for _, line := range lines {
40-
buf.WriteString(fmt.Sprintf("<%s> ", format))
40+
fmt.Fprintf(&buf, "<%s> ", format)
4141
lenLine, _ := Stdout.GetFormatter().Format([]byte(line), &buf)
4242
if n := maxLen - lenLine; n >= 0 {
4343
buf.WriteString(strings.Repeat(" ", n))
4444
}
4545
buf.WriteString(" </>\n")
4646
}
47-
buf.WriteString(fmt.Sprintf("<%s>", format))
47+
fmt.Fprintf(&buf, "<%s>", format)
4848
buf.WriteString(fullPadding)
4949
buf.WriteString("</>\n")
5050

style.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func (s style) createBlock(messages []string, typePrefix, style, prefix string,
106106

107107
if padding {
108108
if style != "" {
109-
buf.WriteString(fmt.Sprintf("<%s>", style))
109+
fmt.Fprintf(&buf, "<%s>", style)
110110
}
111111
buf.WriteString(fullPadding)
112112
if style != "" {
@@ -117,7 +117,7 @@ func (s style) createBlock(messages []string, typePrefix, style, prefix string,
117117

118118
for i, line := range lines {
119119
if style != "" {
120-
buf.WriteString(fmt.Sprintf("<%s>", style))
120+
fmt.Fprintf(&buf, "<%s>", style)
121121
}
122122

123123
buf.WriteString(prefix)
@@ -143,7 +143,7 @@ func (s style) createBlock(messages []string, typePrefix, style, prefix string,
143143

144144
if padding {
145145
if style != "" {
146-
buf.WriteString(fmt.Sprintf("<%s>", style))
146+
fmt.Fprintf(&buf, "<%s>", style)
147147
}
148148
buf.WriteString(fullPadding)
149149
if style != "" {

0 commit comments

Comments
 (0)