mirror of
https://github.com/containers/podman.git
synced 2025-10-18 03:33:32 +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:
@ -1,11 +1,11 @@
|
||||
package generate
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/containers/podman/v4/pkg/systemd/define"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// minTimeoutStopSec is the minimal stop timeout for generated systemd units.
|
||||
@ -20,7 +20,7 @@ func validateRestartPolicy(restart string) error {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
return errors.Errorf("%s is not a valid restart policy", restart)
|
||||
return fmt.Errorf("%s is not a valid restart policy", restart)
|
||||
}
|
||||
|
||||
const headerTemplate = `# {{{{.ServiceName}}}}{{{{- if (eq .IdentifySpecifier true) }}}}@{{{{- end}}}}.service
|
||||
|
Reference in New Issue
Block a user