Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
5 changes: 0 additions & 5 deletions pkg/config/pull_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
8 changes: 0 additions & 8 deletions pkg/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,13 @@ import (
"os"
"path/filepath"
"regexp"
"slices"
"time"

"github.com/containers/storage/pkg/fileutils"
"github.com/fsnotify/fsnotify"
"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 {
Expand Down