vendor: initial vendor
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
25
vendor/github.com/docker/compose-on-kubernetes/api/compose/clone/maps.go
generated
vendored
Normal file
25
vendor/github.com/docker/compose-on-kubernetes/api/compose/clone/maps.go
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
package clone
|
||||
|
||||
// MapOfStringToSliceOfString deep copy a map[string][]string
|
||||
func MapOfStringToSliceOfString(source map[string][]string) map[string][]string {
|
||||
if source == nil {
|
||||
return nil
|
||||
}
|
||||
res := make(map[string][]string, len(source))
|
||||
for k, v := range source {
|
||||
res[k] = SliceOfString(v)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
// MapOfStringToInt deep copy a map[string]int
|
||||
func MapOfStringToInt(source map[string]int) map[string]int {
|
||||
if source == nil {
|
||||
return nil
|
||||
}
|
||||
res := make(map[string]int, len(source))
|
||||
for k, v := range source {
|
||||
res[k] = v
|
||||
}
|
||||
return res
|
||||
}
|
||||
11
vendor/github.com/docker/compose-on-kubernetes/api/compose/clone/slices.go
generated
vendored
Normal file
11
vendor/github.com/docker/compose-on-kubernetes/api/compose/clone/slices.go
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
package clone
|
||||
|
||||
// SliceOfString deep copy a slice of strings
|
||||
func SliceOfString(source []string) []string {
|
||||
if source == nil {
|
||||
return nil
|
||||
}
|
||||
res := make([]string, len(source))
|
||||
copy(res, source)
|
||||
return res
|
||||
}
|
||||
Reference in New Issue
Block a user