Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Expected a map, got 'interface' #341

Open
@du99cy

Description

@du99cy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions