Bump procfs to v0.0.7 (#1538)

Update Prometheus procfs library to the latest release.

Signed-off-by: Ben Kochie <superq@gmail.com>
This commit is contained in:
Ben Kochie 2019-11-16 18:32:15 +01:00 committed by GitHub
commit 8a4c9c154b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 1595 additions and 171 deletions

View file

@ -15,8 +15,8 @@ package procfs
import (
"fmt"
"io/ioutil"
"os"
"github.com/prometheus/procfs/internal/util"
)
// ProcIO models the content of /proc/<pid>/io.
@ -43,13 +43,7 @@ type ProcIO struct {
func (p Proc) IO() (ProcIO, error) {
pio := ProcIO{}
f, err := os.Open(p.path("io"))
if err != nil {
return pio, err
}
defer f.Close()
data, err := ioutil.ReadAll(f)
data, err := util.ReadFileNoStat(p.path("io"))
if err != nil {
return pio, err
}