wanzirong

Results 4 comments of wanzirong

``` func fetchArticle(id int) *Article { article := findArticleFromCache(id) if article != nil && article.ID > 0 { return article } if rand.Intn(100) > 50 { //在执行Do()之前,可以随机让协程sleep。可以看到,因为没有double check,只是用singleflight还是有可能多次执行下游的select time.Sleep(time.Second) }...

谢谢回复。 我的意思是版本不兼容,我代码里用的是github.com/smallnest/rpcx/v5,但protoc-gen-gogorpcx生成的代码import github.com/smallnest/rpcx。这里会有版本兼容问题。

刚接触go-micro和micro就被v2/v3的神操作惊呆。 github路径变了,连文档都没掉。micro v2的examples只能在码云找到一份,有点坑啊。 就算是micro v3,目前还是不稳定。