/go-micro-demo

go micro demo, golang 微服务框架上手

Primary LanguageGo

initialise dependencies

go get ./

start server

go run main.go

start client

cd client
go run client.go

how to use protoc

  1. install protoc
    first, go to protobuf release page, download a suitable platform, then add the execution file to $PATH

  2. run command to generate the template file to current dir

cd greeter
# 删除greeter.pd.go, greeter.pb.micro.go
protoc  --micro_out=. --go_out=. ./gretter.proto