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

FromInterface support #430

Open
KaranaLJX opened this issue Sep 19, 2023 · 1 comment
Open

FromInterface support #430

KaranaLJX opened this issue Sep 19, 2023 · 1 comment

Comments

@KaranaLJX
Copy link

I found that the FromInterface interface does not support types such as [] string and [] int. If such types are passed in, you need to do the conversion yourself to [] interface {}. I would like to ask if there are any suggestions besides doing the conversion yourself.

@KaranaLJX
Copy link
Author

I think the correct approach is to use reflect to obtain the type of interface like the JSON library, instead of directly using swith v. (type), which makes pointer types, arrays, and other types incompatible

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