摘要: package mainimport ( "github.com/streadway/amqp" "fmt")const ( host1 = "127.0.0.1" port1 = 5672)func main() { var ( args = make(map[string]interface{} 阅读全文
posted @ 2020-05-13 17:21 月球放牛 阅读(1115) 评论(0) 推荐(0) 编辑
摘要: package main import ( "github.com/gomodule/redigo/redis" "time" "fmt" "errors") type Redis struct { pool *redis.Pool key string value string timeout i 阅读全文
posted @ 2020-04-08 16:41 月球放牛 阅读(3874) 评论(0) 推荐(0) 编辑
摘要: syntax = "proto3";package proto;//定义请求结构message RequestUser{ string uid=1;}//定义响应结构message ResponseUser{ string nickname=1; string mobile=1; //user.pr 阅读全文
posted @ 2019-11-01 16:26 月球放牛 阅读(1097) 评论(0) 推荐(0) 编辑
摘要: for { select { case <-ch: break }} break跳出的是select,for会继续循环执行 阅读全文
posted @ 2019-09-10 10:45 月球放牛 阅读(107) 评论(0) 推荐(0) 编辑