11 2021 档案

go redis锁
摘要:redis经常用作分布式锁,这里记录一个简单的锁代码如下: package main import ( "crypto/rand" "encoding/base64" "fmt" "github.com/go-redis/redis" "io" "sync" "time" ) func main() 阅读全文

posted @ 2021-11-29 19:53 dz45693 阅读(1703) 评论(0) 推荐(0)

golang 时间missing Location in call to Date
摘要:golang使用"Asia/Shanghai"时区转换时间格式报:missing Location in call to Date 当然解决方法1是:time.FixedZone //os.Setenv("ZONEINFO","D:\\ProgramFiles\\Go\\lib\\time\\zon 阅读全文

posted @ 2021-11-19 12:24 dz45693 阅读(1929) 评论(0) 推荐(0)

导航