ZhangZhihui's Blog  
上一页 1 ··· 41 42 43 44 45 46 47 48 49 ··· 78 下一页

2023年12月5日

摘要: package main import ( "fmt" "golang.org/x/crypto/bcrypt" ) func main() { password := "abcdef" hashedPassword1, _ := bcrypt.GenerateFromPassword([]byte 阅读全文
posted @ 2023-12-05 20:57 ZhangZhihuiAAA 阅读(4) 评论(0) 推荐(0) 编辑
 
摘要: 将一时间戳字段默认值设为0001-01-01 00:00:00 UTC,在timezone为东8区的数据库中字段值显示为: 0001-01-01 08:05:43+08:05:43 Google后找到如下解释: 0001-01-01 00:00:00 UTC. And that is indeed 阅读全文
posted @ 2023-12-05 15:47 ZhangZhihuiAAA 阅读(80) 评论(0) 推荐(0) 编辑

2023年12月4日

摘要: https://github.com/uber-go/mock Install mockgen: zzh@ZZHPC:/zdata/Github/zimplebank$ go install go.uber.org/mock/mockgen@latest go: downloading go.ube 阅读全文
posted @ 2023-12-04 17:24 ZhangZhihuiAAA 阅读(24) 评论(0) 推荐(0) 编辑
 
摘要: Viper uses github.com/mitchellh/mapstructure under the hood for unmarshaling values which uses mapstructure tags by default. supported extensions are 阅读全文
posted @ 2023-12-04 13:38 ZhangZhihuiAAA 阅读(29) 评论(0) 推荐(0) 编辑

2023年12月3日

摘要: Create a file named Postman.desktop under ~/.local/share/applications with below content: [Desktop Entry] Type=Application Version=1.0 Name=Postman Co 阅读全文
posted @ 2023-12-03 19:38 ZhangZhihuiAAA 阅读(9) 评论(0) 推荐(0) 编辑
 
摘要: # Service containers to run with `container-job` services: # Label used to access the service container postgres: # Docker Hub image image: postgres # 阅读全文
posted @ 2023-12-03 12:54 ZhangZhihuiAAA 阅读(6) 评论(0) 推荐(0) 编辑

2023年12月2日

摘要: -- name: ListAccounts :many SELECT * FROM accounts WHERE owner = $1 ORDER BY id LIMIT $2 OFFSET $3; -- name: UpdateAccount :one UPDATE accounts SET ba 阅读全文
posted @ 2023-12-02 23:09 ZhangZhihuiAAA 阅读(16) 评论(0) 推荐(0) 编辑
 
摘要: ERROR: deadlock detectedDETAIL: Process 209 waits for ShareLock on transaction 1034; blocked by process 201.Process 201 waits for ShareLock on transac 阅读全文
posted @ 2023-12-02 23:02 ZhangZhihuiAAA 阅读(249) 评论(0) 推荐(0) 编辑
 
摘要: pg_locks view Looking at pg_locks shows you what locks are granted and what processes are waiting for locks to be acquired. A good query to start look 阅读全文
posted @ 2023-12-02 22:26 ZhangZhihuiAAA 阅读(18) 评论(0) 推荐(0) 编辑

2023年11月29日

摘要: or Adding "-count=1" to "go.testFlags" can disable go test cache. 阅读全文
posted @ 2023-11-29 18:51 ZhangZhihuiAAA 阅读(36) 评论(0) 推荐(0) 编辑
上一页 1 ··· 41 42 43 44 45 46 47 48 49 ··· 78 下一页