草庐IT

AdditionalPrices

全部标签

pointers - 扫描错误 : sql: Scan error on column index 11: destination not a pointer

我知道问题出在哪里,当我尝试从我的数据库调用中扫描字段时,我没有提供指针地址-但是在这种情况下,我不太确定如何解决它。我有一个看起来像这样的结构:typeItemsRequeststruct{Skustring`json:"sku"`Namestring`json:"name"`Barcodestring`json:"barcode,omitempty"`Categorystruct{IDstring`json:"id,omitempty"`Namestring`json:"name,omitempty"`Subcategories[]interface{}`json:"subcate

pointers - 扫描错误 : sql: Scan error on column index 11: destination not a pointer

我知道问题出在哪里,当我尝试从我的数据库调用中扫描字段时,我没有提供指针地址-但是在这种情况下,我不太确定如何解决它。我有一个看起来像这样的结构:typeItemsRequeststruct{Skustring`json:"sku"`Namestring`json:"name"`Barcodestring`json:"barcode,omitempty"`Categorystruct{IDstring`json:"id,omitempty"`Namestring`json:"name,omitempty"`Subcategories[]interface{}`json:"subcate