ZhangZhihui's Blog |
|
||
2023年12月5日
摘要:
package main import ( "fmt" "golang.org/x/crypto/bcrypt" ) func main() { password := "abcdef" hashedPassword1, _ := bcrypt.GenerateFromPassword([]byte 阅读全文
摘要:
将一时间戳字段默认值设为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 阅读全文
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 阅读全文
摘要:
Viper uses github.com/mitchellh/mapstructure under the hood for unmarshaling values which uses mapstructure tags by default. supported extensions are 阅读全文
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 阅读全文
摘要:
# Service containers to run with `container-job` services: # Label used to access the service container postgres: # Docker Hub image image: postgres # 阅读全文
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 阅读全文
摘要:
ERROR: deadlock detectedDETAIL: Process 209 waits for ShareLock on transaction 1034; blocked by process 201.Process 201 waits for ShareLock on transac 阅读全文
摘要:
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 阅读全文
2023年11月29日
摘要:
or Adding "-count=1" to "go.testFlags" can disable go test cache. 阅读全文
|
Copyright © 2024 ZhangZhihuiAAA
Powered by .NET 9.0 on Kubernetes |