摘要: package main import ( "fmt" "time" "github.com/garyburd/redigo/redis" ) const ( RedisURL = "redis://127.0.0.1:6379" redisMaxIdle = 3 //最大空闲连接数 redisId 阅读全文
posted @ 2020-05-28 17:44 newmiracle宇宙 阅读(684) 评论(0) 推荐(0) 编辑
摘要: golang消息队列nsq 1、NSQ下载链接http://nsq.io/deployment/installing.html win下安装 追加I:\nsq-1.2.0.windows-amd64.go1.12.9\bin 2. 打开命令窗口,运行:nsqlookupd 3. 打开新的命令窗口,运 阅读全文
posted @ 2020-05-28 15:15 newmiracle宇宙 阅读(350) 评论(0) 推荐(0) 编辑
摘要: golang 的 go异步编程通道要注意的问题 import ( "database/sql" "fmt" "github.com/gin-gonic/gin" _ "github.com/go-sql-driver/mysql" "log" "time" ) var Db *sql.DB func 阅读全文
posted @ 2020-05-28 10:52 newmiracle宇宙 阅读(1260) 评论(0) 推荐(0) 编辑