Skip to content

Commit

Permalink
upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
jaronnie committed Dec 2, 2021
1 parent 6f1dfdf commit b5225e3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
4 changes: 4 additions & 0 deletions blocface.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
hyperchain
hyperchain
hyperchain
hyperchaintest
10 changes: 10 additions & 0 deletions cmd/put.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package cmd
import (
"context"
"fmt"
"github.com/qiniu/go-sdk/v7/cdn"
"os"
"strings"

Expand Down Expand Up @@ -134,6 +135,15 @@ func putLocalFile(path string, mac *qbox.Mac, bucket string, cfg storage.Config)
fmt.Println("上传失败")
return
}
urlsToRefresh := []string{
"https://" + domains[0].Domain + "/" + upload,
}
cdnManager := cdn.NewCdnManager(mac)
_, err = cdnManager.RefreshUrls(urlsToRefresh)
if err != nil {
fmt.Println(err)
return
}
fmt.Println("https://" + domains[0].Domain + "/" + upload)
}

Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ require (
github.com/mitchellh/go-homedir v1.1.0
github.com/mitchellh/mapstructure v1.4.1 // indirect
github.com/pelletier/go-toml v1.8.1 // indirect
github.com/qiniu/api.v7/v7 v7.8.1
github.com/qiniu/go-sdk/v7 v7.9.6 // indirect
github.com/qiniu/go-sdk/v7 v7.9.6
github.com/spf13/afero v1.5.1 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/cobra v1.1.1
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,6 @@ github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/qiniu/api.v7/v7 v7.8.1 h1:2+kFmiyhwiOYWkyKN8euuHe0DP3YQ3z+dAD48Tvt9gE=
github.com/qiniu/api.v7/v7 v7.8.1/go.mod h1:UykCPhMtPScoW1HOaBiOxi3FG4Ydyw+2TBP4sviG+e8=
github.com/qiniu/go-sdk/v7 v7.9.6 h1:iKK1caSLxKvb+tS43ZDzgfXPP1VT6ngEz9535xaMrAg=
github.com/qiniu/go-sdk/v7 v7.9.6/go.mod h1:Eeqk1/Km3f1MuLUUkg2JCSg/dVkydKbBvEdJJqFgn9g=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
Expand Down

0 comments on commit b5225e3

Please sign in to comment.