remove two deprecated unused functions - #2489
Merged
Merged
Conversation
It is not used by other tools anymore and callers should just use slices.Contains() now. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
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 <pholzing@redhat.com>
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
|
Contributor
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Member
|
LGTM |
Member
|
/lgtm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: