From 9599d94470e0e82ae812edc83be8ae9c670e92a8 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 11 May 2022 22:40:03 -0600 Subject: scan for nodes --- pkg/btrfs/util.go | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 pkg/btrfs/util.go 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 +} -- cgit v1.2.3-2-g168b