mirror of
https://github.com/astaxie/beego.git
synced 2025-06-11 12:20:40 +00:00
fix _ "github.com/go-sql-driver/mysql"
This commit is contained in:
@ -46,9 +46,7 @@ Then in you web app init the global session manager
|
||||
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:
|
||||
|
||||
import _ "github.com/go-sql-driver/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):
|
||||
|
||||
func init() {
|
||||
globalSessions, _ = session.NewManager(
|
||||
|
@ -9,6 +9,7 @@ package session
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
Reference in New Issue
Block a user