摘要:
go type interface {} is interface with no methods 因为返回的是interface类型,需要做转换才能使用 result.Value.( Product) 就是将interface{}专为 Product之后再获取其Price字段的值。 阅读全文
posted @ 2020-02-07 23:10
公众号python学习开发
阅读(724)
评论(0)
推荐(0)
摘要:
``` package main import ( "fmt" "github.com/jinzhu/gorm" "github.com/sirupsen/logrus" _ "github.com/jinzhu/gorm/dialects/sqlite" "encoding/json" ) type Product struct { gorm.Model Code string Price ui 阅读全文
posted @ 2020-02-07 22:07
公众号python学习开发
阅读(989)
评论(0)
推荐(0)

浙公网安备 33010602011771号