Bump github.com/containers/psgo from 1.5.2 to 1.6.0

Bumps [github.com/containers/psgo](https://github.com/containers/psgo) from 1.5.2 to 1.6.0.
- [Release notes](https://github.com/containers/psgo/releases)
- [Commits](https://github.com/containers/psgo/compare/v1.5.2...v1.6.0)

---
updated-dependencies:
- dependency-name: github.com/containers/psgo
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

[NO TESTS NEEDED] since it's migrating to a new version.

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
dependabot[bot]
2021-09-09 16:17:26 +00:00
committed by Valentin Rothberg
parent 784e1ae137
commit 309d989712
11 changed files with 98 additions and 62 deletions

View File

@ -19,8 +19,6 @@ import (
"fmt"
"io"
"os"
"github.com/pkg/errors"
)
type IDMap struct {
@ -51,7 +49,7 @@ func ParseUserNamespace(pid string) (string, error) {
func ReadMappings(path string) ([]IDMap, error) {
file, err := os.Open(path)
if err != nil {
return nil, errors.Wrapf(err, "cannot open %s", path)
return nil, err
}
defer file.Close()
@ -64,7 +62,7 @@ func ReadMappings(path string) ([]IDMap, error) {
if err == io.EOF {
return mappings, nil
}
return nil, errors.Wrapf(err, "cannot read line from %s", path)
return nil, fmt.Errorf("cannot read line from %s: %w", path, err)
}
if line == nil {
return mappings, nil
@ -72,7 +70,7 @@ func ReadMappings(path string) ([]IDMap, error) {
containerID, hostID, size := 0, 0, 0
if _, err := fmt.Sscanf(string(line), "%d %d %d", &containerID, &hostID, &size); err != nil {
return nil, errors.Wrapf(err, "cannot parse %s", string(line))
return nil, fmt.Errorf("cannot parse %s: %w", string(line), err)
}
mappings = append(mappings, IDMap{ContainerID: containerID, HostID: hostID, Size: size})
}