summaryrefslogtreecommitdiff
path: root/pkg/btrfs/util.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/btrfs/util.go')
-rw-r--r--pkg/btrfs/util.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/btrfs/util.go b/pkg/btrfs/util.go
new file mode 100644
index 0000000..04462f8
--- /dev/null
+++ b/pkg/btrfs/util.go
@@ -0,0 +1,10 @@
+package btrfs
+
+func inSlice[T comparable](needle T, haystack []T) bool {
+ for _, straw := range haystack {
+ if needle == straw {
+ return true
+ }
+ }
+ return false
+}