This topic describes how to install EventBridge SDK for Go.
Prepare the environment
Go 1.12.0 or later is installed. For more information, see Install Go.
- Check the Go version
go versioncommand to view the version of Go.
Install the SDK
- Run the following command to enable Go mod:
go env -w GO111MODULE=on
- Run the following command to set a Go mod proxy:
go env -w GOPROXY=https://goproxy.cn,direct
- Run the following command to initialize Go mode and generate the go.mod file:
go mod init
- Run the following command to install SDK for Go:
go get github.com/alibabacloud-go/eventbridge-sdk
- Run the following command to install the output library for Go:
go get github.com/alibabacloud/tea-console