Cleanup: explicitly silence linter for empty else
clause
The `else` block does contain a comment to explain what situation we're in when the `if` condition is false. I like that construct, but golangci-lint did not. No functional changes.
This commit is contained in:
parent
5a5742ce60
commit
da4dd490d0
@ -216,7 +216,8 @@ func (s *Storage) Tail(jobID, taskID string) (string, error) {
|
||||
firstNewline := bytes.IndexByte(buffer, byte('\n'))
|
||||
if 0 <= firstNewline && firstNewline < numBytes-1 {
|
||||
buffer = buffer[firstNewline+1:]
|
||||
} else {
|
||||
} else { //nolint:staticcheck
|
||||
// nolint: because I (Sybren) want to keep the 'else' + the comment it contains
|
||||
// The file consists of a single line of text; don't strip the first line.
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user