-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: post-parse comma-separated flag '--populated-labels'
- Loading branch information
1 parent
4e17a4b
commit fc33dd2
Showing
5 changed files
with
55 additions
and
77 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
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,24 @@ | ||
package globals | ||
|
||
import "strings" | ||
|
||
// CopyMap return a map that is a real copy of the original | ||
// Ref: https://go.dev/blog/maps | ||
func CopyMap(src map[string]interface{}) map[string]interface{} { | ||
m := make(map[string]interface{}, len(src)) | ||
for k, v := range src { | ||
m[k] = v | ||
} | ||
return m | ||
} | ||
|
||
// SplitCommaSeparatedValues get a list of strings and return a new list | ||
// where each element containing commas is divided in separated elements | ||
func SplitCommaSeparatedValues(input []string) []string { | ||
var result []string | ||
for _, item := range input { | ||
parts := strings.Split(item, ",") | ||
result = append(result, parts...) | ||
} | ||
return result | ||
} |
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 was deleted.
Oops, something went wrong.