### Install TOS Go SDK Source: https://github.com/volcengine/ve-tos-golang-sdk/blob/main/README.md Install the TOS Go SDK using the go get command. Ensure you have Go 1.13+ installed. ```shell go get -u github.com/volcengine/ve-tos-golang-sdk/v2 ``` -------------------------------- ### Automate TOS Go SDK Migration with mod Source: https://github.com/volcengine/ve-tos-golang-sdk/blob/main/README.md Automate the migration of TOS Go SDK to v2 using the 'mod' tool. This involves installing the tool, navigating to your project directory, and running the upgrade command. ```shell go install github.com/marwan-at-work/mod/cmd/mod@latest cd your/project/dir mod upgrade --mod-name=github.com/volcengine/ve-tos-golang-sdk ``` -------------------------------- ### Migrate TOS Go SDK Import Path Source: https://github.com/volcengine/ve-tos-golang-sdk/blob/main/README.md Update import paths when migrating from v0.x/v1.x to v2 of the TOS Go SDK. This example shows the change in import statements. ```go import "github.com/volcengine/ve-tos-golang-sdk/tos" ``` ```go import "github.com/volcengine/ve-tos-golang-sdk/v2/tos" ``` -------------------------------- ### Create TOS Go SDK Client Source: https://github.com/volcengine/ve-tos-golang-sdk/blob/main/README.md Create a new TOS client instance using your access key, secret key, endpoint, and region. This client is used to interact with TOS services. ```go var ( accessKey = "your access key" secretKey = "your secret key" endpoint = "your endpoint" region = "your region" ) client, err := tos.NewClientV2(endpoint, tos.WithRegion(region), tos.WithCredentials(tos.NewStaticCredentials(accessKey, secretKey))) ``` -------------------------------- ### Import TOS Go SDK Package Source: https://github.com/volcengine/ve-tos-golang-sdk/blob/main/README.md Import the necessary TOS package for use in your Go project. ```go import "github.com/volcengine/ve-tos-golang-sdk/v2/tos" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.