use the same function signature as "Set"; Kind data is probably not used when deleting
diff --git a/pointer.go b/pointer.go
index 62ed714..74e0116 100644
--- a/pointer.go
+++ b/pointer.go
@@ -91,10 +91,10 @@
}
// Uses the pointer to delete a value from a JSON document (only works on maps/objects right now, not arrays)
-func (p *JsonPointer) Delete(document interface{}) (interface{}, reflect.Kind, error) {
+func (p *JsonPointer) Delete(document interface{}) (interface{}, error) {
is := &implStruct{mode: "DEL", inDocument: document}
p.implementation(is)
- return is.getOutNode, is.getOutKind, is.outError
+ return document, is.outError
}
// Both Get and Set functions use the same implementation to avoid code duplication
diff --git a/pointer_test.go b/pointer_test.go
index ab8a7cd..171396f 100644
--- a/pointer_test.go
+++ b/pointer_test.go
@@ -268,7 +268,7 @@
t.Errorf("NewJsonPointer(%v) error %v", in, err.Error())
}
- _, _, err = p.Delete(jsonDocument)
+ _, err = p.Delete(jsonDocument)
if err != nil {
t.Errorf("Delete(%v) error %v", in, err.Error())
}