This repository has been archived by the owner on Feb 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 136
Inline utils from rules_docker go pkg #725
Open
mrmeku
wants to merge
1
commit into
bazelbuild:master
Choose a base branch
from
mrmeku:723
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package resolver | ||
|
||
import "fmt" | ||
|
||
// ArrayStringFlags are defined for string flags that may have multiple values. | ||
type ArrayStringFlags []string | ||
|
||
// Returns the concatenated string representation of the array of flags. | ||
func (f *ArrayStringFlags) String() string { | ||
return fmt.Sprintf("%v", *f) | ||
} | ||
|
||
// Get returns an empty interface that may be type-asserted to the underlying | ||
// value of type bool, string, etc. | ||
func (f *ArrayStringFlags) Get() interface{} { | ||
return "" | ||
} | ||
|
||
// Set appends value the array of flags. | ||
func (f *ArrayStringFlags) Set(value string) error { | ||
*f = append(*f, value) | ||
return nil | ||
} |
This file contains 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
Oops, something went wrong.
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.
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.
what about this one, should it be inlined too? I guess you'll have a later PR to drop the go_repository that fetches rules_docker code. I don't know what is the maintenance story for rules_k8s so maybe we should wait-and-see if we get any responses.
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.
Yeah, maybe that one should also be inlined as part of this change. I had held off since that particular import needs to be translated to understand the OCI image format rather than the format rules_docker is outputting today. But that translation could easily be done in a followup PR after inlining in this one