1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-18 08:32:40 +08:00

结构体转map

This commit is contained in:
2022-04-22 14:30:37 +08:00
parent 2771310fe2
commit efc8210d97
6 changed files with 184 additions and 0 deletions

12
structs/copy_test.go Normal file
View File

@ -0,0 +1,12 @@
package structs
import "testing"
func TestCopy(t *testing.T) {
v1 := struct{ Abc string }{Abc: "abc"}
v2 := struct{ Abc string }{}
Copy(v1, v2, IgnoreEmpty())
t.Log(v2)
}