summaryrefslogtreecommitdiff
path: root/pkg/btrfs/util.go
blob: 04462f80e3eb42d1f0629d8ca61e39f7839f8131 (plain)
1
2
3
4
5
6
7
8
9
10
package btrfs

func inSlice[T comparable](needle T, haystack []T) bool {
	for _, straw := range haystack {
		if needle == straw {
			return true
		}
	}
	return false
}