There is currently a bug happening when using GetObject(). See the following pseudo-code:
type MyObject struct {
List []string
}
func testcase() {
var o1, o2 MyObject
o1.List = nil // the default is nil anyways
o2.List = []string{}
client.GetObject(nil, key, &o1)
client.GetObject(nil, key, &o2)
if len(o1.List) != len(o2.List) {
panic("BUG: slice was not set properly")
}
}
With the change proposed here the bug is fixed (the slice gets assigned); the assignment f = there is currently doing nothing.
There do not seem to be unit tests for this function, otherwise I would have added a regression test; perhaps I can contribute something on a separate PR.
There is currently a bug happening when using
GetObject()
. See the following pseudo-code:With the change proposed here the bug is fixed (the slice gets assigned); the assignment
f =
there is currently doing nothing.There do not seem to be unit tests for this function, otherwise I would have added a regression test; perhaps I can contribute something on a separate PR.