diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-02-05 10:03:08 -0700 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-02-05 21:01:58 -0700 |
commit | 0ff1d420f21101a92d8da888d491860cf0cf16cc (patch) | |
tree | 3e5715b4e4fd6619f2edddf5bab315cb9a125598 /lib/btrfsprogs/btrfsinspect/rebuildmappings/physicalsums.go | |
parent | 53d7fbb73869eb5defa1ca5c52b26abd346b13b9 (diff) |
containers: s/Cmp/Compare/ to match the standard library
Go 1.18 added net/netip.Addr.Compare, and Go 1.20 added time.Time.Compare.
Diffstat (limited to 'lib/btrfsprogs/btrfsinspect/rebuildmappings/physicalsums.go')
-rw-r--r-- | lib/btrfsprogs/btrfsinspect/rebuildmappings/physicalsums.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/btrfsprogs/btrfsinspect/rebuildmappings/physicalsums.go b/lib/btrfsprogs/btrfsinspect/rebuildmappings/physicalsums.go index 0806a63..da22fbf 100644 --- a/lib/btrfsprogs/btrfsinspect/rebuildmappings/physicalsums.go +++ b/lib/btrfsprogs/btrfsinspect/rebuildmappings/physicalsums.go @@ -1,4 +1,4 @@ -// Copyright (C) 2022 Luke Shumaker <lukeshu@lukeshu.com> +// Copyright (C) 2022-2023 Luke Shumaker <lukeshu@lukeshu.com> // // SPDX-License-Identifier: GPL-2.0-or-later @@ -34,7 +34,7 @@ func ListUnmappedPhysicalRegions(fs *btrfs.FS) map[btrfsvol.DeviceID][]PhysicalR pos := make(map[btrfsvol.DeviceID]btrfsvol.PhysicalAddr) mappings := fs.LV.Mappings() sort.Slice(mappings, func(i, j int) bool { - return mappings[i].PAddr.Cmp(mappings[j].PAddr) < 0 + return mappings[i].PAddr.Compare(mappings[j].PAddr) < 0 }) for _, mapping := range mappings { if pos[mapping.PAddr.Dev] < mapping.PAddr.Addr { |