mirror of
https://github.com/containers/podman.git
synced 2025-12-01 18:49:18 +08:00
Update module github.com/openshift/imagebuilder to v1.2.15
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
23
vendor/github.com/openshift/imagebuilder/internal/env.go
generated
vendored
Normal file
23
vendor/github.com/openshift/imagebuilder/internal/env.go
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
package internal
|
||||
|
||||
import "strings"
|
||||
|
||||
type EnvironmentSlice []string
|
||||
|
||||
func (e EnvironmentSlice) Keys() []string {
|
||||
keys := make([]string, 0, len(e))
|
||||
for _, kv := range e {
|
||||
k, _, _ := strings.Cut(kv, "=")
|
||||
keys = append(keys, k)
|
||||
}
|
||||
return keys
|
||||
}
|
||||
|
||||
func (e EnvironmentSlice) Get(key string) (string, bool) {
|
||||
for _, kv := range e {
|
||||
if k, v, ok := strings.Cut(kv, "="); ok && k == key {
|
||||
return v, true
|
||||
}
|
||||
}
|
||||
return "", false
|
||||
}
|
||||
Reference in New Issue
Block a user