摘要:
// Create db.Create(&table1{Name: "小明", Age: 80}) // INSERT INTO `table1` (`created_at`,`updated_at`,`deleted_at`,`name`,`age`) VALUES ('2022-01-09 22 阅读全文
posted @ 2022-01-09 22:05
JaydenQiu
阅读(57)
评论(0)
推荐(0)
摘要:
package main import ( "gorm.io/driver/mysql" "gorm.io/gorm" "gorm.io/gorm/logger" "log" "os" "time" ) type table1 struct { gorm.Model Name string Age 阅读全文
posted @ 2022-01-09 21:15
JaydenQiu
阅读(839)
评论(0)
推荐(0)
摘要:
client 端添加超时机制 // 添加超时机制 ctx,_ := context.WithTimeout(context.Background(),time.Second*3) // 执行服务端的方法 res,err := c.SayHello(ctx,&proto.StreamReqData{D 阅读全文
posted @ 2022-01-09 15:13
JaydenQiu
阅读(346)
评论(0)
推荐(0)

浙公网安备 33010602011771号