import( “database/sql” // 引入数据库驱动注册及初始化 _ “github.com/go-sql-driver/mysql” ) 添加_ “github.com/go-sql-driver/mysql”这一行就可以了
import(
“database/sql”
// 引入数据库驱动注册及初始化
_ “github.com/go-sql-driver/mysql” )
添加_ “github.com/go-sql-driver/mysql”这一行就可以了