(搭配上一篇配置的文章)
启动first-network网络:
cd /opt/gopath/src/github.com/hyperledger/fabric-samples/first-network
./byfn up
下载演示代码及运行:
演示放在github上,会慢慢更新功能示例以及注释说明,目前有连接first-network网络以及管理channel、chaincode、event的示例(路过顺手点个star,谢谢大家)
https://github.com/hxyxx/fabric-sdk-go-sample.git
cd /opt/gopath/src/github.com/hyperledger
git clone https://github.com/hxyxx/fabric-sdk-go-sample.git
cd fabric-sdk-go-sample
go mod download
go run main.go
注 go mod download指令要开启go mod,开启步骤:
vim /etc/profile
在文章末尾加上
export GO111MODULE=on
更新环境变量
source /etc/profile