Skip to content

Commit

Permalink
Fix go sec findings
Browse files Browse the repository at this point in the history
Add undefined variables for function calls where there results are not
used and are not required for the respective operation.
  • Loading branch information
HeavyWombat committed Oct 12, 2020
1 parent 31e0ce9 commit 194c6ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func parseSelectGraphicRenditionEscapeSequence(escapeSeq string) (uint64, error)
func processTextAnnotations(text *String) error {
var buffer bytes.Buffer
for _, coloredRune := range *text {
buffer.WriteByte(byte(coloredRune.Symbol))
_ = buffer.WriteByte(byte(coloredRune.Symbol))
}

raw := buffer.String()
Expand Down
6 changes: 3 additions & 3 deletions render.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ func (s String) String() string {
prepend = append(prepend, 0)
}

buffer.WriteString(renderSGR(coloredRune.Settings, prepend...))
_, _ = buffer.WriteString(renderSGR(coloredRune.Settings, prepend...))
current = coloredRune.Settings
}

buffer.WriteByte(byte(coloredRune.Symbol))
_ = buffer.WriteByte(byte(coloredRune.Symbol))
}

// Make sure to finish with a reset escape sequence
if current != 0 {
buffer.WriteString(renderSGR(0))
_, _ = buffer.WriteString(renderSGR(0))
}

return buffer.String()
Expand Down

0 comments on commit 194c6ae

Please sign in to comment.