diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2022-11-29 14:42:30 -0700 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2022-12-20 20:02:11 -0700 |
commit | 182bab3aa8b8e08d6a35d344c32d93a4293a36f4 (patch) | |
tree | c580feb7c6e0ca1a3fba717618a0a82e6b562eee /lib/btrfsprogs/btrfsinspect/rebuildnodes/util.go | |
parent | 60ca1cb76b2fef0a74cfb17837e90212631affea (diff) |
rebuildnodes: Refactor uuidMap in to a separate sub-package
Diffstat (limited to 'lib/btrfsprogs/btrfsinspect/rebuildnodes/util.go')
-rw-r--r-- | lib/btrfsprogs/btrfsinspect/rebuildnodes/util.go | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/lib/btrfsprogs/btrfsinspect/rebuildnodes/util.go b/lib/btrfsprogs/btrfsinspect/rebuildnodes/util.go index bdaa0c4..8c43dad 100644 --- a/lib/btrfsprogs/btrfsinspect/rebuildnodes/util.go +++ b/lib/btrfsprogs/btrfsinspect/rebuildnodes/util.go @@ -5,21 +5,11 @@ package rebuildnodes import ( - "fmt" - "golang.org/x/exp/constraints" "git.lukeshu.com/btrfs-progs-ng/lib/btrfsprogs/btrfsinspect" ) -func maybeSet[K, V comparable](name string, m map[K]V, k K, v V) error { - if other, conflict := m[k]; conflict && other != v { - return fmt.Errorf("conflict: %s %v can't have both %v and %v", name, k, other, v) - } - m[k] = v - return nil -} - func countNodes(nodeScanResults btrfsinspect.ScanDevicesResult) int { var cnt int for _, devResults := range nodeScanResults { |