forked from bazelbuild/rules_k8s
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Inline utils from rules_docker go pkg
For bazelbuild#723
- Loading branch information
Daniel Muller
committed
Apr 7, 2023
1 parent
75c78d0
commit e4830cd
Showing
4 changed files
with
613 additions
and
17 deletions.
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.