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