This topic describes how to install EventBridge SDK for Go.
Prepare the environment
- Prerequisites
Go 1.12.0 or later is installed. For more information, see Install Go.
- Check the Go version
Run the go version
command to view the version of Go.
Install the SDK
- Run the following command to enable Go mod:
- 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:
- 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