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 }