gitee.com/zhongguo168a/gocodes@v0.0.0-20230609140523-e1828349603f/datax/versionx/cachez_test.go (about) 1 package versionx 2 3 import ( 4 "fmt" 5 "gitee.com/zhongguo168a/gocodes/datax" 6 "testing" 7 ) 8 9 type A struct { 10 Int int 11 String string 12 Map datax.M 13 } 14 15 func TestObject_ToMap(t *testing.T) { 16 17 root := NewRoot(NewSourceWith(datax.M{})) 18 root.RefClass("1a").RefUpdate(datax.M{"2a": datax.M{ 19 "3a": datax.M{ 20 "4a": 1, 21 }, 22 }}) 23 24 fmt.Printf("data=%+v\n", root.data) 25 fmt.Printf("origint=%+v\n", root.origin) 26 }