Skip to content

Commit

Permalink
修复初始化bug
Browse files Browse the repository at this point in the history
  • Loading branch information
水煮不是清蒸 committed Oct 18, 2020
1 parent c59f4c8 commit 33c6844
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions commands/api_template/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ package models
})
if err != nil {
logrus.Println(err, "Database connection failed. Database name: %s", name)
return db
}
dbc, err := db.DB()
setupDB(dbc)
Expand Down
2 changes: 1 addition & 1 deletion commands/api_template/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var repositories = `package repositories
import (
"{{.Appname}}/models"
"github.com/jinzhu/gorm"
""gorm.io/gorm""
)
type TestRepositories struct {
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
##### 更新日志
```
v1.0.0 默认初始化基础的api模板 gorm+iris restful接口
v1.0.1-v1.0.5 修改iris版本更新代码
v1.0.1-v1.0.6 将jinzhu/gorm修改为gorm.io/gorm,并且添加casbin权限初始化
v1.1.1-v1.1.5 修改iris版本更新代码,添加日志组件
v1.1.1-v1.1.6 将jinzhu/gorm修改为gorm.io/gorm,并且添加casbin权限初始化
```

##V1.0.0
Expand Down

0 comments on commit 33c6844

Please sign in to comment.