This topic describes the sample code of Object Storage Service (OSS) SDK for Go in various scenarios based on the OSS SDK for Go V1 code repository.
Source code and API documents
For the source code of OSS SDK for Go, visit GitHub. For more information, visit Documentation.
Sample programs
OSS SDK for Go provides various sample programs for your reference or use. The following table describes the sample programs.
Sample code file | Content |
Upload objects, including Simple upload and Resumable upload. | |
Download objects, including Streaming download and Conditional download. | |
OSS SDK for Go V2
OSS SDK for Go V2 is a major rewrite of the OSS SDK for Go V1 code repository. OSS SDK for Go V2 is built based on Go 1.18 and later, which simplifies underlying operations such as identification authentication, automatic retry of failed requests, and error handling. OSS SDK for Go V2 provides flexible parameter configuration methods and rich advanced operations, such as paginator, transmission managers, and File-like operations. This comprehensively improves development efficiency and experience.
For more information about how to get started with V2, visit alibabacloud-oss-go-sdk-v2.
For more information about how to upgrade OSS SDK for Go V1 to OSS SDK for Go V2, see Upgrade guide.