fixed swallowed err variable

This commit is contained in:
Lars Lehtonen 2017-07-06 17:42:18 -07:00 committed by Vish (Ishaya) Abrams
parent 54f0e4339c
commit 86bef332bf
1 changed files with 3 additions and 1 deletions

View File

@ -138,7 +138,9 @@ func getThisCgroup(cgroupType string) (string, error) {
return "", fmt.Errorf("docker pid not found in /var/run/docker.pid")
}
pid, err := strconv.Atoi(result[0])
if err != nil {
return "", err
}
output, err := ioutil.ReadFile(fmt.Sprintf("/proc/%d/cgroup", pid))
if err != nil {
return "", err