6f93b2bc by astaxie

fix _ "github.com/go-sql-driver/mysql"

1 parent 70dc9d7e
...@@ -46,9 +46,7 @@ Then in you web app init the global session manager ...@@ -46,9 +46,7 @@ Then in you web app init the global session manager
46 go globalSessions.GC() 46 go globalSessions.GC()
47 } 47 }
48 48
49 * Use **MySQL** as provider, the last param is the DSN, learn more from [mysql](https://github.com/go-sql-driver/mysql#dsn-data-source-name),but first you should import mysql: 49 * Use **MySQL** as provider, the last param is the DSN, learn more from [mysql](https://github.com/go-sql-driver/mysql#dsn-data-source-name):
50
51 import _ "github.com/go-sql-driver/mysql"
52 50
53 func init() { 51 func init() {
54 globalSessions, _ = session.NewManager( 52 globalSessions, _ = session.NewManager(
......
...@@ -9,6 +9,7 @@ package session ...@@ -9,6 +9,7 @@ package session
9 9
10 import ( 10 import (
11 "database/sql" 11 "database/sql"
12 _ "github.com/go-sql-driver/mysql"
12 "sync" 13 "sync"
13 "time" 14 "time"
14 ) 15 )
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!