Closed yeahia2508 closed 8 years ago
In Gorm example struct Impl is like this:
Impl
type Impl struct { DB gorm.DB }
but bellow line causing this error: i.DB, err = gorm.Open("mysql", "root:@/gorm?charset=utf8&parseTime=True")
i.DB, err = gorm.Open("mysql", "root:@/gorm?charset=utf8&parseTime=True")
gorm.Open return *DB so Impl struct should be like this right? :
type Impl struct { DB *gorm.DB }
Indeed, it looks like the Gorm API has changes. I'm fixing the example. Thanks for reporting!
done
In Gorm example struct
Impl
is like this:but bellow line causing this error:
i.DB, err = gorm.Open("mysql", "root:@/gorm?charset=utf8&parseTime=True")
gorm.Open return *DB so Impl struct should be like this right? :