|
2 | 2 |
|
3 | 3 | Robust & Easy to use model mapper and utility methods for Go. Typical methods increase productivity and make Go developement more fun :smile:
|
4 | 4 |
|
5 |
| -**v0.2 released and tagged on Jan 26, 2016** |
| 5 | +***v0.3 released and tagged on Feb 16, 2016*** |
6 | 6 |
|
7 | 7 | go-model tested with Go `v1.2` and above.
|
8 | 8 |
|
9 | 9 | ## Features
|
10 |
| -go-model provides handy methods (`Copy`, `Map`, `Clone`, `IsZero`, etc.) to process struct with below highlighted features. It's born from typical need while developing Go application or utility. I hope it's helpful! |
| 10 | +go-model provides [handy methods](#methods) to process `struct` with below highlighted features. It's born from typical need while developing Go application or utility. I hope it's helpful! |
11 | 11 | * Embedded/Anonymous struct
|
12 | 12 | * Multi-level nested struct/map/slice
|
13 | 13 | * Pointer and non-pointer within struct/map/slice
|
14 | 14 | * Struct within map and slice
|
15 |
| -* Embedded/Anonymous fields appear in map at same level as represented by Go |
| 15 | +* Embedded/Anonymous struct fields appear in map at same level as represented by Go |
16 | 16 | * Interface within struct/map/slice
|
17 | 17 | * Add global no traverse type to the list or use `notraverse` option in the struct field
|
18 | 18 | * Options to name map key, omit empty fields, and instruct not to traverse with struct/map/slice
|
@@ -76,6 +76,7 @@ I want to convert my struct into Map (`map[string]interface{}`). Sure, go-model
|
76 | 76 | // -, name, omitempty, notraverse to get desired result.
|
77 | 77 | sr, _ := myapp.GetSearchResult( /* params here */ )
|
78 | 78 |
|
| 79 | +// Embedded/Anonymous struct fields appear in map at same level as represented by Go |
79 | 80 | srchResMap, err := model.Map(sr)
|
80 | 81 | fmt.Println("Error:", err)
|
81 | 82 |
|
@@ -163,5 +164,8 @@ BTW, I'd like to know what you think about go-model. Kindly open an issue or sen
|
163 | 164 | ## Author
|
164 | 165 | Jeevanandam M. - [email protected]
|
165 | 166 |
|
| 167 | +## Contributors |
| 168 | +Have a look on [Contributors](https://github.com/jeevatkm/go-model/graphs/contributors) page. |
| 169 | + |
166 | 170 | ## License
|
167 | 171 | go-model released under MIT license, refer [LICENSE](LICENSE) file.
|
0 commit comments