gorm字段使用自定义前缀
type Blog struct { ID int Author Author `gorm:”emb… 继续阅读 gorm字段使用自定义前缀
type Blog struct { ID int Author Author `gorm:”emb… 继续阅读 gorm字段使用自定义前缀
解决办法: root:123456@tcp(127.0.0.1:3306)/testdb?chars… 继续阅读 Scan error on column index 1, name “created_at”: unsupported Scan, storing driver.Value type []uint8
newUser := model.User{ Phone: phone, Password: str… 继续阅读 gorm insert捕获失败情况
update t1 set ArrivalDate=date_add(ArrivalDate, in… 继续阅读 mysql data_time增加天数
$ kill -l 1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL… 继续阅读 kill信号列表
func main() { router := gin.Default() // 为 multipa… 继续阅读 gin router 限制multipart forms内存
//默认0表示不限制 db.DB().SetMaxIdleConns(2000) db.DB().S… 继续阅读 gorm设置最大连接数和最大闲置数
db.Set(“grom:table_options”, “ENGINE=InnoDB”)
// 如果设置为true,`User`的默认表名为`user`,使用`TableName`设置的表名… 继续阅读 gorm全局禁用表名复数
db.LogMode(true)
gorm.DefaultTableNameHanlder = func(db *gorm.DB,de… 继续阅读 gorm给默认表名加前缀和后缀
type User struct{ Id int Name string } // 自定义表名 fu… 继续阅读 gorm自定义表名
int转成string: string := strconv.Itoa(int) int64转成st… 继续阅读 golang strconv字符串和int互转
get: https://github.com/apache/maven-mvnd https://… 继续阅读 apache mvnd 打包工程
“token”: “eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ… 继续阅读 jwt token结构
timeoutHour := 24 expirationTime := time.Now().Add… 继续阅读 golang time duration usage
src := “hello world” // 标准Base64编码 res1 := base64.… 继续阅读 golang base64 EncodeToString DecodeString
stream { allow 114.114.114.114; deny all; proxy_ti… 继续阅读 nginx stream tcp代理 增加白名单
设置allow、deny参数,也可作用于TCP和UDP代理: allow 114.114.114.1… 继续阅读 NGINX白名单配置
ssl socket: import ssl, socket hostname = ‘www.bai… 继续阅读 python get https ssl cert