From d7b154bab1506ffa2b7ddbd834b64bfbc082a6a2 Mon Sep 17 00:00:00 2001 From: jojoliang Date: Sun, 26 Sep 2021 16:38:05 +0800 Subject: [PATCH] update --- example/object/fetch_task.go | 10 +++++----- example/object/get_with_cvm_role.go | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/example/object/fetch_task.go b/example/object/fetch_task.go index 70afbf2..5ceb888 100644 --- a/example/object/fetch_task.go +++ b/example/object/fetch_task.go @@ -3,7 +3,7 @@ package main import ( "context" "fmt" - "github.com/agin719/cos-go-sdk-v5" + "github.com/tencentyun/cos-go-sdk-v5" "github.com/tencentyun/cos-go-sdk-v5/debug" "net/http" "net/url" @@ -31,9 +31,10 @@ func log_status(err error) { } func main() { - u, e := url.Parse("http://ap-guangzhou.migration.myqcloud.com") - log_status(e) - b := &cos.BaseURL{BucketURL: u, FetchURL: u} + bucket := "test-1259654469" + bu, _ := url.Parse("https://" + bucket + ".cos.ap-guangzhou.myqcloud.com") + u, _ := url.Parse("http://ap-guangzhou.migration.myqcloud.com") + b := &cos.BaseURL{BucketURL: bu, FetchURL: u} c := cos.NewClient(b, &http.Client{ Transport: &cos.AuthorizationTransport{ SecretID: os.Getenv("COS_SECRETID"), @@ -46,7 +47,6 @@ func main() { }, }, }) - bucket := "test-1259654469" opt := &cos.PutFetchTaskOptions{ Url: "http://" + bucket + ".cos.ap-guangzhou.myqcloud.com/exampleobject", Key: "exampleobject", diff --git a/example/object/get_with_cvm_role.go b/example/object/get_with_cvm_role.go index a5a2272..0eaa56f 100644 --- a/example/object/get_with_cvm_role.go +++ b/example/object/get_with_cvm_role.go @@ -7,7 +7,7 @@ import ( "net/http" - "github.com/agin719/cos-go-sdk-v5" + "github.com/tencentyun/cos-go-sdk-v5" "github.com/tencentyun/cos-go-sdk-v5/debug" )