Update README.md

The line:
// db := gorm.Open("postgres", dbSql)
should be
// db, _ := gorm.Open("postgres", dbSql)
This commit is contained in:
Nguyen Dang Minh 2015-05-02 16:19:54 +07:00
parent 25772352c2
commit a4a29d6025
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ db, err := gorm.Open("postgres", "user=gorm dbname=gorm sslmode=disable")
// You can also use an existing database connection handle
// dbSql, _ := sql.Open("postgres", "user=gorm dbname=gorm sslmode=disable")
// db := gorm.Open("postgres", dbSql)
// db, _ := gorm.Open("postgres", dbSql)
// Get database connection handle [*sql.DB](http://golang.org/pkg/database/sql/#DB)
db.DB()