Closed stoffen closed 2 years ago
Hey @stoffen ,
Thanks for raising the issue! Looks like it was an issue calling reflect.Set()
. This should now be fixed with v2.14.3
.
Please note, when calling patch, you will need to pass in a pointer to the value you're patching to, so your example would become:
// pass in t1 as pointer
patchLog := diff.Patch(changelog, &t1)
assert.False(t, patchLog.HasErrors())
Thanks, you just saved my day
Hi, In the following I am unable to patch the struct. To me it seems that the diff holds a string and that the reflection machinery does not consider the target pointer. I am missing something here? Thanks:)