mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-01 09:32:08 +00:00
tailcfg: make NodeKey.IsZero have a value receiver
This commit is contained in:
@@ -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)) }
|
||||
|
||||
Reference in New Issue
Block a user