Registry / cloud / mozillazg-go-cos

mozillazg-go-cos

JSON →
library0.13.0gogounverified

Go SDK for Tencent Cloud Object Storage (COS) service, wrapping the V5 XML API.

go get github.com/mozillazg/go-cos
INSTALL
IMPORT
SIG · MOZILLAZG-GO-COS
M
mozillazg-go-cos
cloudgov0.13.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

cos
github.com/mozillazg/go-cos

Create a COS client and list bucket contents.

package main import ( "context" "fmt" "net/http" "github.com/mozillazg/go-cos" ) func main() { client := cos.NewClient(&http.Client{}, "https://example-1234567890.cos.ap-guangzhou.myqcloud.com") resp, err := client.Bucket.Get(context.Background()) if err != nil { panic(err) } fmt.Println(resp.StatusCode) }
Debug
Known issues
gotchaDefault HTTP client has no timeout; requests may hang indefinitely.
fix
Set a timeout on the http.Client, e.g., &http.Client{Timeout: 30 * time.Second}.
affects: all
Upgrade
Version history
0.13.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
10
Resources
mozillazg-go-cos — go get mozillazg-go-cos · libregistry