mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-25 11:05:45 +00:00
types/logid: add a Compare method
Updates #cleanup Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
parent
52212f4323
commit
6114247d0a
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user