1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2025-06-30 21:28:28 +00:00

keyval: cleaner struct functions

KeyVal specific functions can be a part of the struct.
Also add tests and fix the NewValue functions for suffixes

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2017-06-22 14:53:49 -04:00
parent 64ecdb40ec
commit 14721e6869
3 changed files with 46 additions and 7 deletions

View file

@ -299,7 +299,7 @@ func compareEntry(oldEntry, newEntry Entry) ([]KeyDelta, error) {
// Modified
default:
if !KeyValEqual(*diff.Old, *diff.New) {
if !diff.Old.Equal(*diff.New) {
results = append(results, KeyDelta{
diff: Modified,
name: name,