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

Expected a map, got 'interface' #341

Open
du99cy opened this issue Oct 26, 2023 · 0 comments
Open

Expected a map, got 'interface' #341

du99cy opened this issue Oct 26, 2023 · 0 comments

Comments

@du99cy
Copy link

du99cy commented Oct 26, 2023

image

This is a common function for create a item with given model and dto. The issue is summarized like the following:

  • data has type of interface{} | dto.CreateDeliveryOrderDTO
  • ins has type of interface{} | *model.DeliveryOrder

I want to decode from data to ins so that insert to database by GORM.
But I got a error expected a map, got interface. Any way to fix it for me? Thank you.

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