mirror of
https://github.com/tailscale/tailscale.git
synced 2025-03-23 01:31:06 +00:00
tailcfg: make NodeKey.IsZero have a value receiver
This commit is contained in:
parent
51b669e4bd
commit
b1d5548fa7
@ -467,9 +467,9 @@ func (k *NodeKey) UnmarshalText(text []byte) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (k *NodeKey) IsZero() bool {
|
||||
z := NodeKey{}
|
||||
return bytes.Equal(k[:], z[:])
|
||||
// IsZero reports whether k is the NodeKey zero value.
|
||||
func (k NodeKey) IsZero() bool {
|
||||
return k == NodeKey{}
|
||||
}
|
||||
|
||||
func (id ID) String() string { return fmt.Sprintf("id:%x", int64(id)) }
|
||||
|
Loading…
x
Reference in New Issue
Block a user