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 return nil
} }
func (k *NodeKey) IsZero() bool { // IsZero reports whether k is the NodeKey zero value.
z := NodeKey{} func (k NodeKey) IsZero() bool {
return bytes.Equal(k[:], z[:]) return k == NodeKey{}
} }
func (id ID) String() string { return fmt.Sprintf("id:%x", int64(id)) } func (id ID) String() string { return fmt.Sprintf("id:%x", int64(id)) }

Loading…
Cancel
Save