Skip to content

Commit d7b154b

Browse files
author
jojoliang
committed
update
1 parent d2e9d91 commit d7b154b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

example/object/fetch_task.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package main
33
import (
44
"context"
55
"fmt"
6-
"github.com/agin719/cos-go-sdk-v5"
6+
"github.com/tencentyun/cos-go-sdk-v5"
77
"github.com/tencentyun/cos-go-sdk-v5/debug"
88
"net/http"
99
"net/url"
@@ -31,9 +31,10 @@ func log_status(err error) {
3131
}
3232

3333
func main() {
34-
u, e := url.Parse("http://ap-guangzhou.migration.myqcloud.com")
35-
log_status(e)
36-
b := &cos.BaseURL{BucketURL: u, FetchURL: u}
34+
bucket := "test-1259654469"
35+
bu, _ := url.Parse("https://" + bucket + ".cos.ap-guangzhou.myqcloud.com")
36+
u, _ := url.Parse("http://ap-guangzhou.migration.myqcloud.com")
37+
b := &cos.BaseURL{BucketURL: bu, FetchURL: u}
3738
c := cos.NewClient(b, &http.Client{
3839
Transport: &cos.AuthorizationTransport{
3940
SecretID: os.Getenv("COS_SECRETID"),
@@ -46,7 +47,6 @@ func main() {
4647
},
4748
},
4849
})
49-
bucket := "test-1259654469"
5050
opt := &cos.PutFetchTaskOptions{
5151
Url: "http://" + bucket + ".cos.ap-guangzhou.myqcloud.com/exampleobject",
5252
Key: "exampleobject",

example/object/get_with_cvm_role.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
"net/http"
99

10-
"github.com/agin719/cos-go-sdk-v5"
10+
"github.com/tencentyun/cos-go-sdk-v5"
1111
"github.com/tencentyun/cos-go-sdk-v5/debug"
1212
)
1313

0 commit comments

Comments
 (0)