mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
re: #10528 Refactors PG Coordinator to work with the Tailnet v2 API, including wrappers for the existing v1 API. The debug endpoint functions, but doesn't return sensible data, that will be in another stacked PR.
21 lines
375 B
Go
21 lines
375 B
Go
package proto
|
|
|
|
import (
|
|
"bytes"
|
|
|
|
gProto "google.golang.org/protobuf/proto"
|
|
)
|
|
|
|
// Equal returns true if the nodes have the same contents
|
|
func (s *Node) Equal(o *Node) (bool, error) {
|
|
sBytes, err := gProto.Marshal(s)
|
|
if err != nil {
|
|
return false, err
|
|
}
|
|
oBytes, err := gProto.Marshal(o)
|
|
if err != nil {
|
|
return false, err
|
|
}
|
|
return bytes.Equal(sBytes, oBytes), nil
|
|
}
|