mirror of
https://github.com/containers/podman.git
synced 2025-08-02 17:22:30 +08:00
pkg: 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. [NO NEW TESTS NEEDED] Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
This commit is contained in:
@ -4,10 +4,10 @@
|
||||
package machine
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/containers/common/pkg/config"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
func AddConnection(uri fmt.Stringer, name, identity string, isDefault bool) error {
|
||||
@ -72,7 +72,7 @@ func RemoveConnection(name string) error {
|
||||
if _, ok := cfg.Engine.ServiceDestinations[name]; ok {
|
||||
delete(cfg.Engine.ServiceDestinations, name)
|
||||
} else {
|
||||
return errors.Errorf("unable to find connection named %q", name)
|
||||
return fmt.Errorf("unable to find connection named %q", name)
|
||||
}
|
||||
return cfg.Write()
|
||||
}
|
||||
|
Reference in New Issue
Block a user