aboutsummaryrefslogtreecommitdiff
path: root/format/pack
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-05 21:33:55 +0800
committerGravatar Runxi Yu2026-03-05 21:33:55 +0800
commit059586a94c6532fad6a3f6c853b31f7d81cd963d (patch)
tree7969404234b1fc50a59447f320aab370ba5b2700 /format/pack
parent*: I guess os.Root is alright for tests too *shrug* (diff)
signatureNo signature
format/pack/ingest: Fix minLen/min lint v0.1.49
Diffstat (limited to 'format/pack')
-rw-r--r--format/pack/ingest/stream.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/format/pack/ingest/stream.go b/format/pack/ingest/stream.go
index 0a496167..72f6c5a4 100644
--- a/format/pack/ingest/stream.go
+++ b/format/pack/ingest/stream.go
@@ -107,16 +107,16 @@ func (scanner *streamScanner) ReadByte() (byte, error) {
}
// fill ensures at least min unread bytes are available in receiver's buffer.
-func (scanner *streamScanner) fill(min int) error {
- if min <= 0 {
+func (scanner *streamScanner) fill(minLen int) error {
+ if minLen <= 0 {
return nil
}
- if min > len(scanner.buf) {
- return fmt.Errorf("format/pack/ingest: fill(%d) exceeds scanner buffer", min)
+ if minLen > len(scanner.buf) {
+ return fmt.Errorf("format/pack/ingest: fill(%d) exceeds scanner buffer", minLen)
}
- for scanner.n-scanner.off < min {
+ for scanner.n-scanner.off < minLen {
err := scanner.flushConsumedPrefix()
if err != nil {
return err
@@ -128,7 +128,7 @@ func (scanner *streamScanner) fill(min int) error {
}
if err != nil {
- if errors.Is(err, io.EOF) && scanner.n-scanner.off >= min {
+ if errors.Is(err, io.EOF) && scanner.n-scanner.off >= minLen {
return nil
}