Equal returns true if the nodes have the same contents
(o *Node)
| 8 | |
| 9 | // Equal returns true if the nodes have the same contents |
| 10 | func (s *Node) Equal(o *Node) (bool, error) { |
| 11 | sBytes, err := gProto.Marshal(s) |
| 12 | if err != nil { |
| 13 | return false, err |
| 14 | } |
| 15 | oBytes, err := gProto.Marshal(o) |
| 16 | if err != nil { |
| 17 | return false, err |
| 18 | } |
| 19 | return bytes.Equal(sBytes, oBytes), nil |
| 20 | } |