summaryrefslogtreecommitdiff
path: root/vendor/github.com/projectatomic/buildah/chroot/util.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/projectatomic/buildah/chroot/util.go')
-rw-r--r--vendor/github.com/projectatomic/buildah/chroot/util.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/vendor/github.com/projectatomic/buildah/chroot/util.go b/vendor/github.com/projectatomic/buildah/chroot/util.go
new file mode 100644
index 000000000..34cc77260
--- /dev/null
+++ b/vendor/github.com/projectatomic/buildah/chroot/util.go
@@ -0,0 +1,15 @@
+// +build linux
+
+package chroot
+
+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
+}