Skip to content

Commit

Permalink
Merge pull request #5 from iamgoroot/mongo
Browse files Browse the repository at this point in the history
Mongo
  • Loading branch information
iamgoroot committed Sep 12, 2022
2 parents 5b9c243 + 8c17a3e commit 99d8e85
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions template/core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const dbObjectIdent = `
{{- if eq . "Gorm" }} *gorm.DB{{ end -}}
{{- if eq . "Bee" }} orm.Ormer{{ end -}}
{{- if eq . "Pg" }} *pg.DB{{ end -}}
{{- if eq . "Mongo" }}DB *mongo.Database{{ end -}}
`

var CoreImport = template.Tr[inspected.Opts](template.AtImport, `
Expand All @@ -19,6 +20,7 @@ var CoreImport = template.Tr[inspected.Opts](template.AtImport, `
{{ if eq . "Gorm" }}"gorm.io/gorm"{{ end -}}
{{ if eq . "Bee" }}"github.com/beego/beego/v2/client/orm"{{ end -}}
{{ if eq . "Pg" }}"github.com/go-pg/pg/v10"{{ end -}}
{{ if eq . "Mongo" }}"go.mongodb.org/mongo-driver/mongo"{{ end -}}
{{- end -}}
`)

Expand Down

0 comments on commit 99d8e85

Please sign in to comment.