Skip to content

Commit 194c6ae

Browse files
committed
Fix go sec findings
Add undefined variables for function calls where there results are not used and are not required for the respective operation.
1 parent 31e0ce9 commit 194c6ae

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

parse.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ func parseSelectGraphicRenditionEscapeSequence(escapeSeq string) (uint64, error)
147147
func processTextAnnotations(text *String) error {
148148
var buffer bytes.Buffer
149149
for _, coloredRune := range *text {
150-
buffer.WriteByte(byte(coloredRune.Symbol))
150+
_ = buffer.WriteByte(byte(coloredRune.Symbol))
151151
}
152152

153153
raw := buffer.String()

render.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,16 @@ func (s String) String() string {
5050
prepend = append(prepend, 0)
5151
}
5252

53-
buffer.WriteString(renderSGR(coloredRune.Settings, prepend...))
53+
_, _ = buffer.WriteString(renderSGR(coloredRune.Settings, prepend...))
5454
current = coloredRune.Settings
5555
}
5656

57-
buffer.WriteByte(byte(coloredRune.Symbol))
57+
_ = buffer.WriteByte(byte(coloredRune.Symbol))
5858
}
5959

6060
// Make sure to finish with a reset escape sequence
6161
if current != 0 {
62-
buffer.WriteString(renderSGR(0))
62+
_, _ = buffer.WriteString(renderSGR(0))
6363
}
6464

6565
return buffer.String()

0 commit comments

Comments
 (0)