mirror of
https://github.com/charlienet/go-mixed.git
synced 2025-07-18 08:32:40 +08:00
结构体转map
This commit is contained in:
12
structs/copy_test.go
Normal file
12
structs/copy_test.go
Normal 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)
|
||||
}
|
Reference in New Issue
Block a user