Skip to content

Commit

Permalink
Fix style issues reported by golangci-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
generalmimon committed Aug 2, 2024
1 parent 83c47c9 commit cbb64ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions kaitai/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,8 @@ func (k *Stream) ReadBytesTermMulti(term []byte, includeTerm, consumeTerm, eosEr
}
r = append(r, c[:n]...)
return r, nil
} else {
return nil, fmt.Errorf("ReadBytesTermMulti: %w", err)
}
return nil, fmt.Errorf("ReadBytesTermMulti: %w", err)
}
if bytes.Equal(c, term) {
if includeTerm {
Expand Down
2 changes: 1 addition & 1 deletion kaitai/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func BytesTerminate(s []byte, term byte, includeTerm bool) []byte {
}
newLen := termIndex
if includeTerm {
newLen += 1
newLen++
}
return s[:newLen]
}
Expand Down

0 comments on commit cbb64ca

Please sign in to comment.