cmd/podman: switch to golang native error wrapping

We now use the golang error wrapping format specifier `%w` instead of
the deprecated github.com/pkg/errors package.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
This commit is contained in:
Sascha Grunert
2022-06-30 10:05:44 +02:00
parent 3426d56b92
commit e8adec5f41
88 changed files with 343 additions and 379 deletions

View File

@ -4,6 +4,7 @@
package main
import (
"errors"
"fmt"
"io"
"io/ioutil"
@ -13,7 +14,6 @@ import (
"strconv"
"strings"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
@ -97,7 +97,7 @@ func getUser() (string, string, string, error) {
return "", "", "", fmt.Errorf("invalid uid for user: %s", name)
}
if id == 0 {
return "", "", "", fmt.Errorf("unexpected root user")
return "", "", "", errors.New("unexpected root user")
}
return name, uid, home, nil