Replace uses of strings.Split(N) with strings.Cut()#3936
Merged
thaJeztah merged 14 commits intodocker:masterfrom Dec 29, 2022
Merged
Replace uses of strings.Split(N) with strings.Cut()#3936thaJeztah merged 14 commits intodocker:masterfrom
strings.Split(N) with strings.Cut()#3936thaJeztah merged 14 commits intodocker:masterfrom
Conversation
f636304 to
0bac506
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #3936 +/- ##
==========================================
- Coverage 59.21% 59.20% -0.01%
==========================================
Files 287 287
Lines 24720 24690 -30
==========================================
- Hits 14637 14617 -20
+ Misses 9198 9189 -9
+ Partials 885 884 -1 |
0bac506 to
c4c7638
Compare
Member
Author
|
@rumpl ptal 🤗 |
vvoland
requested changes
Dec 29, 2022
cli/command/container/opts.go
Outdated
| return securityOpts, errors.Errorf("Invalid --security-opt: %q", opt) | ||
| } | ||
| k, v, ok := strings.Cut(opt, "=") | ||
| if !ok && k != "no-new-privileged" { |
Collaborator
There was a problem hiding this comment.
no-new-privileges -> no-new-privileged? 😄
Member
Author
There was a problem hiding this comment.
Oh! 💩 🙈 Good catch. I, erm, blame auto-correct, but I likely fat-fingered 😂 .
cli/command/container/opts.go
Outdated
| if !ok && k != "no-new-privileged" { | ||
| k, v, ok = strings.Cut(opt, ":") | ||
| } | ||
| if (!ok || v == "") && k != "no-new-privileged" { |
Signed-off-by: Sebastiaan van Stijn <[email protected]>
This validator was not specific to "log options", so renaming it to make this clearer; also updating values used in the tests to make it clear they're not "actual" valid values, just for testing, and while updating, also fixed some unhandled errors in tests. Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
c4c7638 to
42de5cc
Compare
Member
Author
|
@vvoland fixed the typos 😅 (I'd love to get rid of some of that logic in the ParseSecurityOpts; I don't think it should all belong in that function, or even in the CLI code) |
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.
Similar to moby/moby#44381
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)