Skip to content

Commit

Permalink
Postgres nil pointer fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
vkuznecovas committed Sep 25, 2020
1 parent 7d5682b commit 4628ce7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions db/sqlxDriver/postgres/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,13 @@ func CreateDatabase(databaseConfig model.Database) (abstraction.Database, error)
if err != nil {
return nil, err
}
db = d
db.Mapper = reflectx.NewMapperTagFunc("db",
func(s string) string {
return s
},
nil,
func(s string) string {
return strings.ToLower(s)
},
)
db = d
DB := sqlxDriver.Database{
DB: db,
Queries: PostgresQueries,
Expand Down

0 comments on commit 4628ce7

Please sign in to comment.