File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package main
33import (
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
3333func 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" ,
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments