From 5ded927a9a8ad4451a9c98742e73509fb4ca22fe Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Fri, 15 Nov 2013 19:43:45 +0800 Subject: [PATCH] change method NewDialect to New --- dialect/dialect.go | 2 +- main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dialect/dialect.go b/dialect/dialect.go index 5a829735..4120985e 100644 --- a/dialect/dialect.go +++ b/dialect/dialect.go @@ -8,7 +8,7 @@ type Dialect interface { ReturningStr(key string) string } -func NewDialect(driver string) Dialect { +func New(driver string) Dialect { var d Dialect switch driver { case "postgres": diff --git a/main.go b/main.go index c835b231..dd234758 100644 --- a/main.go +++ b/main.go @@ -19,7 +19,7 @@ type DB struct { func Open(driver, source string) (db DB, err error) { db.db, err = sql.Open(driver, source) - db.dialect = dialect.NewDialect(driver) + db.dialect = dialect.New(driver) return }