From fd2d5e3b7feac0f668821107ff277d997a1be870 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 1 Dec 2023 14:08:08 +0100 Subject: [PATCH] Check bufio.(*Scanner).Err() --- sysconf_linux.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysconf_linux.go b/sysconf_linux.go index 5fb49ac..cd9845f 100644 --- a/sysconf_linux.go +++ b/sysconf_linux.go @@ -98,6 +98,9 @@ func getNprocsProcStat() (int64, error) { break } } + if err := s.Err(); err != nil { + return -1, err + } return count, nil }