diff --git a/pkg/config/config.go b/pkg/config/config.go index c118b11e9..f904eb2db 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -847,8 +847,7 @@ func (c *EngineConfig) Validate() error { } // Check if the pullPolicy from containers.conf is valid // if it is invalid returns the error - pullPolicy := strings.ToLower(c.PullPolicy) - if _, err := ValidatePullPolicy(pullPolicy); err != nil { + if _, err := ParsePullPolicy(c.PullPolicy); err != nil { return fmt.Errorf("invalid pull type from containers.conf %q: %w", c.PullPolicy, err) } diff --git a/pkg/config/pull_policy.go b/pkg/config/pull_policy.go index d85d30ffe..474ede73e 100644 --- a/pkg/config/pull_policy.go +++ b/pkg/config/pull_policy.go @@ -87,8 +87,3 @@ func ParsePullPolicy(s string) (PullPolicy, error) { return PullPolicyUnsupported, fmt.Errorf("unsupported pull policy %q", s) } } - -// Deprecated: please use `ParsePullPolicy` instead. -func ValidatePullPolicy(s string) (PullPolicy, error) { - return ParsePullPolicy(s) -} diff --git a/pkg/util/util.go b/pkg/util/util.go index 14464927e..72cb2404e 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -5,7 +5,6 @@ import ( "os" "path/filepath" "regexp" - "slices" "time" "github.com/containers/storage/pkg/fileutils" @@ -13,13 +12,6 @@ import ( "github.com/sirupsen/logrus" ) -// StringInSlice determines if a string is in a string slice, returns bool. -// -// Deprecated: Use [slices.Contains] instead. -func StringInSlice(s string, sl []string) bool { - return slices.Contains(sl, s) -} - // StringMatchRegexSlice determines if a given string matches one of the given regexes, returns bool func StringMatchRegexSlice(s string, re []string) bool { for _, r := range re {