change method NewDialect to New

This commit is contained in:
Jinzhu 2013-11-15 19:43:45 +08:00
parent 52fd87c57b
commit 5ded927a9a
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ type Dialect interface {
ReturningStr(key string) string ReturningStr(key string) string
} }
func NewDialect(driver string) Dialect { func New(driver string) Dialect {
var d Dialect var d Dialect
switch driver { switch driver {
case "postgres": case "postgres":

View File

@ -19,7 +19,7 @@ type DB struct {
func Open(driver, source string) (db DB, err error) { func Open(driver, source string) (db DB, err error) {
db.db, err = sql.Open(driver, source) db.db, err = sql.Open(driver, source)
db.dialect = dialect.NewDialect(driver) db.dialect = dialect.New(driver)
return return
} }