官方文档
安装
- 安装 xorm.io/xorm
- 安装 Mysql驱动
基本使用连接
- xorm连接数据库, 根据User结构体生成表
package main
import (
"fmt"
"time"
_ "github.com/go-sql-driver/mysql"
"xorm.io/xorm"
)
type User struct {
Id int64
Age int
Password string `xorm: