GO micro V3环境搭建

​​​​​​​https://github.com/micro/micro

目前用上面的micro代码工具micro new来创建目录

https://github.com/asim/go-micro

代码运行用asim的micro framework

  import

    "github.com/asim/go-micro/v3"
    "github.com/asim/go-micro/v3/logger"

这个分开用的情况应该也是V3商业化的原因

get后去下面的位置 生产micro命令行工具,

cd go/pkg/mod/github.com/micro/micro/v3 

$ sudo go build -o micro main.go
$ sudo cp micro /bin/

以下是老版本的安装方式,仅供参考

Go-Micro工具安装步骤

1.protobuf 编译工具安装 
1、下载 protoBuf: 
git clone https://github.com/protocolbuffers/protobuf.git 
2、或者直接将压缩包拖入后解压 
unzip protobuf.zip 
3、安装依赖库 
sudo apt-get install autoconf automake libtool curl make g++ unzip libffi-dev -y 
4、进入目录 
cd protobuf/ 
5、自动生成configure配置文件: 
./autogen.sh 
6、配置环境: 
./configure 
7、编译源代码(时间比较长): 
make 
8、安装 
sudo make install 
9、刷新共享库 (很重要的一步啊) 
sudo ldconfig 
10、成功后需要使用命令测试 
protoc -h
2.protobuf 的 go 语言插件安装
1获取 pr

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值