Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
jojoliang committed Sep 26, 2021
1 parent d2e9d91 commit d7b154b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions example/object/fetch_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"),
Expand All @@ -46,7 +47,6 @@ func main() {
},
},
})
bucket := "test-1259654469"
opt := &cos.PutFetchTaskOptions{
Url: "http://" + bucket + ".cos.ap-guangzhou.myqcloud.com/exampleobject",
Key: "exampleobject",
Expand Down
2 changes: 1 addition & 1 deletion example/object/get_with_cvm_role.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down

0 comments on commit d7b154b

Please sign in to comment.