From bf2327276e6b3c8158a23362ca2fca5f46317e56 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 5 Jun 2022 16:46:34 -0600 Subject: factor out a btrfsmisc pacage --- pkg/btrfs/util.go | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 pkg/btrfs/util.go (limited to 'pkg/btrfs/util.go') diff --git a/pkg/btrfs/util.go b/pkg/btrfs/util.go deleted file mode 100644 index 671d6fc..0000000 --- a/pkg/btrfs/util.go +++ /dev/null @@ -1,28 +0,0 @@ -package btrfs - -import ( - "golang.org/x/exp/constraints" -) - -func inSlice[T comparable](needle T, haystack []T) bool { - for _, straw := range haystack { - if needle == straw { - return true - } - } - return false -} - -func max[T constraints.Ordered](a, b T) T { - if a > b { - return a - } - return b -} - -func min[T constraints.Ordered](a, b T) T { - if a < b { - return a - } - return b -} -- cgit v1.2.3-2-g168b