Commit 6f93b2bc authored by astaxie's avatar astaxie

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

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
go globalSessions.GC() go globalSessions.GC()
} }
* 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: * 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):
import _ "github.com/go-sql-driver/mysql"
func init() { func init() {
globalSessions, _ = session.NewManager( globalSessions, _ = session.NewManager(
......
...@@ -9,6 +9,7 @@ package session ...@@ -9,6 +9,7 @@ package session
import ( import (
"database/sql" "database/sql"
_ "github.com/go-sql-driver/mysql"
"sync" "sync"
"time" "time"
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment