Closed laushunyu closed 3 months ago
@jinzhu review needed pls
@jinzhu 带带弟弟
Hi @laushunyu
Can you add some tests for this?
Hi @laushunyu
Can you add some tests for this?
Hi!
testcase added.
in current master:
=== RUN TestValuerConv
copier_converter_test.go:272: copier failed from copier_test.From{Data:copier_test.IntArray{1, 2, 3}} to copier_test.To{Data:[]copier_test.Int(nil)}
--- FAIL: TestValuerConv (0.00s)
FAIL
after fixed:
=== RUN TestValuerConv
copier_test.To{Data:[]copier_test.Int{1, 2, 3}}--- PASS: TestValuerConv (0.00s)
PASS
when the field of struct implement
driver.Valuer
and cannot convert to dest type directly,copier.set()
will return a unexpected(true, nil)
testcode:
output:
fixed: