control/controlclient: remove unused, slow, often-not-what-you-want NetworkMap.Equal

pull/605/head
Brad Fitzpatrick 4 years ago
parent 4970e771ab
commit be3ca5cbfd

@ -5,7 +5,6 @@
package controlclient
import (
"bytes"
"encoding/json"
"fmt"
"log"
@ -55,26 +54,6 @@ type NetworkMap struct {
// TODO(crawshaw): Capabilities []tailcfg.Capability
}
func (n *NetworkMap) Equal(n2 *NetworkMap) bool {
if n == nil && n2 == nil {
return true
}
if n == nil || n2 == nil {
return false
}
// TODO(crawshaw): this is crude, but is an easy way to avoid bugs.
b, err := json.Marshal(n)
if err != nil {
panic(err)
}
b2, err := json.Marshal(n2)
if err != nil {
panic(err)
}
return bytes.Equal(b, b2)
}
func (nm NetworkMap) String() string {
return nm.Concise()
}

Loading…
Cancel
Save