Skip to content

Commit f545fb0

Browse files
Merge pull request #2489 from Luap99/deprecated
remove two deprecated unused functions
2 parents 809d426 + 09a1b14 commit f545fb0

File tree

3 files changed

+1
-15
lines changed

3 files changed

+1
-15
lines changed

pkg/config/config.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -847,8 +847,7 @@ func (c *EngineConfig) Validate() error {
847847
}
848848
// Check if the pullPolicy from containers.conf is valid
849849
// if it is invalid returns the error
850-
pullPolicy := strings.ToLower(c.PullPolicy)
851-
if _, err := ValidatePullPolicy(pullPolicy); err != nil {
850+
if _, err := ParsePullPolicy(c.PullPolicy); err != nil {
852851
return fmt.Errorf("invalid pull type from containers.conf %q: %w", c.PullPolicy, err)
853852
}
854853

pkg/config/pull_policy.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,3 @@ func ParsePullPolicy(s string) (PullPolicy, error) {
8787
return PullPolicyUnsupported, fmt.Errorf("unsupported pull policy %q", s)
8888
}
8989
}
90-
91-
// Deprecated: please use `ParsePullPolicy` instead.
92-
func ValidatePullPolicy(s string) (PullPolicy, error) {
93-
return ParsePullPolicy(s)
94-
}

pkg/util/util.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,13 @@ import (
55
"os"
66
"path/filepath"
77
"regexp"
8-
"slices"
98
"time"
109

1110
"github.com/containers/storage/pkg/fileutils"
1211
"github.com/fsnotify/fsnotify"
1312
"github.com/sirupsen/logrus"
1413
)
1514

16-
// StringInSlice determines if a string is in a string slice, returns bool.
17-
//
18-
// Deprecated: Use [slices.Contains] instead.
19-
func StringInSlice(s string, sl []string) bool {
20-
return slices.Contains(sl, s)
21-
}
22-
2315
// StringMatchRegexSlice determines if a given string matches one of the given regexes, returns bool
2416
func StringMatchRegexSlice(s string, re []string) bool {
2517
for _, r := range re {

0 commit comments

Comments
 (0)