-
Notifications
You must be signed in to change notification settings - Fork 223
remove two deprecated unused functions #2489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
It is not used by other tools anymore and callers should just use slices.Contains() now. Signed-off-by: Paul Holzinger <[email protected]>
It was deprecated and beside on caller here it doesn't seem to be used by podman/buildah so just drop it. Also ParsePullPolicy() already does strings.ToLower() on the input so there is no need for the caller to do that again. Signed-off-by: Paul Holzinger <[email protected]>
Reviewer's GuideThis PR removes two deprecated utility functions (StringInSlice and ValidatePullPolicy), cleans up related imports, and updates remaining callers to use slices.Contains and ParsePullPolicy directly. Class diagram for removal of StringInSlice and ValidatePullPolicy functionsclassDiagram
class util {
%% StringInSlice function removed
%% StringMatchRegexSlice(s string, re []string) bool
}
class config {
%% ValidatePullPolicy function removed
ParsePullPolicy(s string) (PullPolicy, error)
}
class EngineConfig {
+Validate() error
PullPolicy : string
}
EngineConfig --> config : uses ParsePullPolicy
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Luap99, sourcery-ai[bot] The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
LGTM |
|
/lgtm |
pkg/util: remove StringInSlice()
It is not used by other tools anymore and callers should just use
slices.Contains() now.
pkg/config: remove ValidatePullPolicy()
It was deprecated and beside on caller here it doesn't seem to be used
by podman/buildah so just drop it.
Also ParsePullPolicy() already does strings.ToLower() on the input so
there is no need for the caller to do that again.
Summary by Sourcery
Remove two deprecated and unused functions and update callers to use the recommended alternatives
Enhancements: