control/controlclient: remove unused, slow, often-not-what-you-want NetworkMap.Equal
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()
}
