Use deep copy instead of gob encode/decode

This commit is contained in:
Tobie Morgan Hitchcock 2016-09-12 16:47:22 +01:00
parent c3ecaed152
commit dfa9182711

View file

@ -21,6 +21,7 @@ import (
"strconv"
"strings"
"github.com/abcum/surreal/util/deep"
"github.com/abcum/surreal/util/pack"
)
@ -46,7 +47,7 @@ func (d *Doc) Data() interface{} {
// Data returns the internal data object as an interface.
func (d *Doc) Copy() (i interface{}) {
return pack.Copy(d.data)
return deep.Copy(d.data)
}
// JSON converts the data object to a JSON byte slice.