Skip to content

Commit 42a4b06

Browse files
committed
update map
1 parent 8ce9063 commit 42a4b06

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,18 @@
4242
//transfer the struct to map
4343
StructToMap(&strcut{/*your strcut*/})
4444

45+
type Struct1 struct{
46+
Value string
47+
}
48+
type Struct2 struct {
49+
S1 Struct1
50+
}
51+
52+
exampleWithSubMap := StructToMap(&Struct2{})
53+
//to get the Value
54+
exampleWithSubMap.GetString("S1.Value")
55+
56+
57+
58+
4559
```

0 commit comments

Comments
 (0)