1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-04 12:52:28 +08:00

merge main

This commit is contained in:
dudaodong
2023-09-06 16:19:11 +08:00
2 changed files with 2 additions and 1 deletions

View File

@@ -99,7 +99,7 @@ func (c *cloner) cloneArray(v reflect.Value) reflect.Value {
for i := 0; i < v.Len(); i++ {
val := c.clone(v.Index(i))
if val.IsValid() {
if !val.IsValid() {
continue
}

View File

@@ -337,6 +337,7 @@ func TestDeepClone(t *testing.T) {
Nil: nil,
// unexported: "can't be cloned",
},
[]interface{}{1, &Struct{Str: "test"}, Struct{Str: "test2"}},
}
for i, item := range cases {