diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2022-05-11 22:40:03 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2022-05-11 22:40:03 -0600 |
commit | 9599d94470e0e82ae812edc83be8ae9c670e92a8 (patch) | |
tree | 8bb0b4059726f5fd87e9705bcdb9e45959feed3b /pkg |
scan for nodes
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/btrfs/util.go | 10 |
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 +} |