mirror of
https://github.com/containers/podman.git
synced 2025-12-07 06:11:07 +08:00
Vendor in latest Buildah
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
This commit is contained in:
12
vendor/github.com/containers/buildah/imagebuildah/util.go
generated
vendored
12
vendor/github.com/containers/buildah/imagebuildah/util.go
generated
vendored
@@ -105,6 +105,18 @@ func TempDirForURL(dir, prefix, url string) (name string, subdir string, err err
|
||||
return "", "", errors.Errorf("unreachable code reached")
|
||||
}
|
||||
|
||||
func dedupeStringSlice(slice []string) []string {
|
||||
done := make([]string, 0, len(slice))
|
||||
m := make(map[string]struct{})
|
||||
for _, s := range slice {
|
||||
if _, present := m[s]; !present {
|
||||
m[s] = struct{}{}
|
||||
done = append(done, s)
|
||||
}
|
||||
}
|
||||
return done
|
||||
}
|
||||
|
||||
// InitReexec is a wrapper for buildah.InitReexec(). It should be called at
|
||||
// the start of main(), and if it returns true, main() should return
|
||||
// immediately.
|
||||
|
||||
Reference in New Issue
Block a user