package models import ( "fmt" "github.com/astaxie/beego" "github.com/astaxie/beego/orm" _"github.com/go-sql-driver/mysql" ) //定义一个用户结构体 type user struct{ Id int Name string Password string } func init() { //ORM操作数据库 //获取连接对象 err:=orm.RegisterDataBase...