摘要:
看下面的代码调用了server.Init()之后就支持命令行读取配置了 package main import ( "github.com/gin-gonic/gin" "github.com/micro/go-micro/registry" "github.com/micro/go-micro/w 阅读全文
摘要:
我们会使用主站api调用商品api 使用go-micro访问consul获取服务信息 package main import ( "fmt" "github.com/micro/go-micro/client/selector" "github.com/micro/go-micro/registry 阅读全文
摘要:
安装go-plugins go get -v github.com/micro/go-plugins,原来go-micro consul的支持已经迁移到了go-plugins里面 package main import ( "github.com/gin-gonic/gin" "github.com 阅读全文
摘要:
package main import ( "github.com/gin-gonic/gin" "github.com/micro/go-micro/web" ) func main() { ginRouter := gin.Default() ginRouter.Handle("GET", "/ 阅读全文
摘要:
先下载Go Micro框架 go get -v github.com/micro/go-micro 启动一个简单的Server package main import ( "github.com/micro/go-micro/web" "net/http" ) func main() { /*第一种 阅读全文