Ompluscator / dynamic-struct

Golang package for editing struct's fields during runtime and mapping structs to other structs.
MIT License
672 stars 83 forks source link

Need Capacity as a input to NewSliceOfStructs() #29

Open ktanqwerty opened 9 months ago

ktanqwerty commented 9 months ago

NewSliceOfStructs() currently returns slice of dynamic struct with 0 capcity. This is causing memory leak issues in my case (where we need to unmarshall sqlx.Rows output to slice of dynamic struct). It would be better if it takes capacity as input and returns the slice with the given capacity.