types/logid: add a Compare method

Updates #cleanup

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson 2023-07-28 13:49:04 -07:00 committed by Dave Anderson
parent 52212f4323
commit 6114247d0a

View File

@ -84,7 +84,11 @@ func (id PublicID) String() string {
}
func (id1 PublicID) Less(id2 PublicID) bool {
return slices.Compare(id1[:], id2[:]) < 0
return id1.Compare(id2) < 0
}
func (id1 PublicID) Compare(id2 PublicID) int {
return slices.Compare(id1[:], id2[:])
}
func (id PublicID) IsZero() bool {