Go 原生接口
依赖
- golang >= 1.13
- make >= 3.0
- curl >= 7.1.1
- thrift 0.13.x
- Linux、Macos 或其他类 unix 系统
- Windows+bash(WSL、cygwin、Git Bash)
安装方法
1. # 切换到 GOPATH 的 HOME 路径,启用 Go Modules 功能
2. export GO111MODULE=on
4. # 配置 GOPROXY 环境变量
5. export GOPROXY=https://goproxy.io
7. # 创建命名的文件夹或目录,并切换当前目录
8. mkdir session_example && cd session_example
10. # 保存文件,自动跳转到新的地址
11. curl -o session_example.go -L https://github.com/apache/iotdb-client-go/raw/main/example/session_example.go
13. # 初始化 go module 环境
14. go mod init session_example
16. # 下载依赖包
17. go mod tidy
19. # 编译并运行程序
20. go run session_example.go
1. # get thrift 0.13.0
2. go get github.com/apache/thrift@0.13.0
4. # 递归创建目录
5. mkdir -p $GOPATH/src/iotdb-client-go-example/session_example
7. # 切换到当前目录
8. cd $GOPATH/src/iotdb-client-go-example/session_example
10. # 保存文件,自动跳转到新的地址
11. curl -o session_example.go -L https://github.com/apache/iotdb-client-go/raw/main/example/session_example.go
13. # 初始化 go module 环境
14. go mod init
16. # 下载依赖包
17. go mod tidy
19. # 编译并运行程序
20. go run session_example.go