summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2022-05-11 22:40:03 -0600
committerLuke Shumaker <lukeshu@lukeshu.com>2022-05-11 22:40:03 -0600
commit9599d94470e0e82ae812edc83be8ae9c670e92a8 (patch)
tree8bb0b4059726f5fd87e9705bcdb9e45959feed3b
scan for nodes
-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
+}