mirror of
https://github.com/containers/podman.git
synced 2025-06-18 07:28:57 +08:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user