• 1

在 http://pulsar.apache.org/docs/en/client-libraries-cpp/ 中下载  dep 包并安装

在 ubuntu desktop 18.04 上搭建 pulsar-client-go V2.3.2 开发环境

 

  • 2

在 /etc/profile 中增加下面几个配置

export GOPROXY=https://athens.azurefd.net
export GO111MODULE=on

保存后, 执行 source /etc/profile

 

  • 3

go get -u github.com/apache/pulsar/pulsar-client-go/[email protected]

 

  • 4

编写一个 pulsar demo 代码,然后在代码目录下执行

go mod init

go build

 

编译通过

 

参考文章

https://tonybai.com/2018/11/26/hello-go-module-proxy/ 

相关文章: