Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need Capacity as a input to NewSliceOfStructs() #29

Open
ktanqwerty opened this issue Oct 14, 2023 · 0 comments
Open

Need Capacity as a input to NewSliceOfStructs() #29

ktanqwerty opened this issue Oct 14, 2023 · 0 comments

Comments

@ktanqwerty
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant