summaryrefslogtreecommitdiff
path: root/lib/btrfs/btrfsprim
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-02-05 10:03:08 -0700
committerLuke Shumaker <lukeshu@lukeshu.com>2023-02-05 21:01:58 -0700
commit0ff1d420f21101a92d8da888d491860cf0cf16cc (patch)
tree3e5715b4e4fd6619f2edddf5bab315cb9a125598 /lib/btrfs/btrfsprim
parent53d7fbb73869eb5defa1ca5c52b26abd346b13b9 (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/btrfs/btrfsprim')
-rw-r--r--lib/btrfs/btrfsprim/misc.go8
-rw-r--r--lib/btrfs/btrfsprim/uuid.go2
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/btrfs/btrfsprim/misc.go b/lib/btrfs/btrfsprim/misc.go
index 22939bf..da661f6 100644
--- a/lib/btrfs/btrfsprim/misc.go
+++ b/lib/btrfs/btrfsprim/misc.go
@@ -44,14 +44,14 @@ func (key Key) Mm() Key {
return key
}
-func (a Key) Cmp(b Key) int {
- if d := containers.NativeCmp(a.ObjectID, b.ObjectID); d != 0 {
+func (a Key) Compare(b Key) int {
+ if d := containers.NativeCompare(a.ObjectID, b.ObjectID); d != 0 {
return d
}
- if d := containers.NativeCmp(a.ItemType, b.ItemType); d != 0 {
+ if d := containers.NativeCompare(a.ItemType, b.ItemType); d != 0 {
return d
}
- return containers.NativeCmp(a.Offset, b.Offset)
+ return containers.NativeCompare(a.Offset, b.Offset)
}
var _ containers.Ordered[Key] = Key{}
diff --git a/lib/btrfs/btrfsprim/uuid.go b/lib/btrfs/btrfsprim/uuid.go
index 0103ee4..232ab58 100644
--- a/lib/btrfs/btrfsprim/uuid.go
+++ b/lib/btrfs/btrfsprim/uuid.go
@@ -47,7 +47,7 @@ func (uuid UUID) Format(f fmt.State, verb rune) {
fmtutil.FormatByteArrayStringer(uuid, uuid[:], f, verb)
}
-func (a UUID) Cmp(b UUID) int {
+func (a UUID) Compare(b UUID) int {
for i := range a {
if d := int(a[i]) - int(b[i]); d != 0 {
return d