tailcfg: make NodeKey.IsZero have a value receiver

pull/198/head
Brad Fitzpatrick 5 years ago
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…
Cancel
Save