worldline-go / struct2

convert struct to map with custom hook functions
https://pkg.go.dev/github.com/worldline-go/struct2
MIT License
20 stars 3 forks source link

More documentation #4

Open Dragomir-Ivanov opened 2 years ago

Dragomir-Ivanov commented 2 years ago

Greetings, I have land on your lovely package, and it may fix my frustrations of mapstructure and now inactive structs. What is not obvious from documentation, is how is structs2 related to mapstructure and structs. My understanding so far is that it only replaces structs, i.e. covers Go struct -> map[string]interface{} conversion, but for the other way around, one should still use mapstructure. Please add some information about what gaps struct2 fills in.

Also, I am keen on helping you with structs2 package.

rytsh commented 2 years ago

Hi @Dragomir-Ivanov, that's true. This library not directly related with mapstructure and structs. I just used some parts and idea in here and so I want to mentioned it.

I will try to add it but also I really like to see your help.