1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 13:10:54 +00:00

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

This commit is contained in:
astaxie 2013-11-26 17:16:35 +08:00
parent 70dc9d7e14
commit 6f93b2bcbe
2 changed files with 2 additions and 3 deletions

View File

@ -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(

View File

@ -9,6 +9,7 @@ package session
import ( import (
"database/sql" "database/sql"
_ "github.com/go-sql-driver/mysql"
"sync" "sync"
"time" "time"
) )