Files
worker/internal/webapp/scan.go
Gleb Tv 2c7a0236da feat: publish standalone worker
Separate worker packaging and service lifecycle from the control plane.
2026-07-13 17:55:14 +03:00

16 строки
403 B
Go

package webapp
import "bufio"
// bufioNewScanner is a thin wrapper around bufio.NewScanner with a
// 1 MiB max line size. Most /proc files fit comfortably under that.
// Splitting it out lets tests override the buffer size if needed.
func bufioNewScanner(r interface {
Read(p []byte) (int, error)
},
) *bufio.Scanner {
s := bufio.NewScanner(r)
s.Buffer(make([]byte, 0, 64*1024), 1<<20)
return s
}