mapstructure
mapstructure copied to clipboard
Expected a map, got 'interface'
This is a common function for create a item with given model and dto. The issue is summarized like the following:
datahas type ofinterface{} | dto.CreateDeliveryOrderDTOinshas type ofinterface{} | *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.