This topic describes how to install and update the server operation SDK for Go.
ApsaraVideo VOD is activated. For more information, see Activate ApsaraVideo VOD.
Go 1.7 or later is installed. You can visit the official website of Go to download an appropriate version.
Install the SDK
You can install the SDK by running the
go get or
glide command as needed.
- Run the
go getcommand to install the SDK. The following sample code provides an example:
go get -u github.com/aliyun/alibaba-cloud-sdk-go/sdkNote
- No messages appear during the installation. Wait until the installation is complete. If the installation times out, run the command again.
- If the src/github.com/aliyun/alibaba-cloud-sdk-go/services/vod subfolder is displayed in the folder that stores the GOPATH file, the SDK is installed.
- Run the
glidecommand to install the SDK. The following sample code provides an example:
glide get github.com/aliyun/alibaba-cloud-sdk-go
Update the SDK
If new features or new API operations are unavailable in the current SDK, update the SDK to the latest version. For more information, see Install the SDK.
What to do next
After the installation, you need to initialize the SDK. You can initialize the server operation SDK for Go by using an AccessKey pair or a Security Token Service (STS) token. For more information, see Initialization.