Browse Source

修复 get code 问题

Signed-off-by: allan716 <[email protected]>
allan716 3 years ago
parent
commit
32865eee83
1 changed files with 3 additions and 2 deletions
  1. 3 2
      internal/pkg/something_static/something_static.go

+ 3 - 2
internal/pkg/something_static/something_static.go

@@ -76,10 +76,11 @@ func writeFile(saveFileFPath, enString, nowTime string) error {
 }
 }
 
 
 func GetCodeFromWeb(l *logrus.Logger, nowTimeFileNamePrix string) (string, string, error) {
 func GetCodeFromWeb(l *logrus.Logger, nowTimeFileNamePrix string) (string, string, error) {
-	const baseCodeFileUrl = "https://cdn.jsdelivr.net/gh/"
+	//const baseCodeFileUrl = "https://raw.githubusercontents.com/"
+	const baseCodeFileUrl = "https://raw.staticdn.net/"
 	const whichProject = "allanpk716/SomeThingsStatic/"
 	const whichProject = "allanpk716/SomeThingsStatic/"
 
 
-	desUrl := baseCodeFileUrl + whichProject + nowTimeFileNamePrix + common.StaticFileName00
+	desUrl := baseCodeFileUrl + whichProject + "master/" + nowTimeFileNamePrix + common.StaticFileName00
 
 
 	fileBytes, _, err := my_util.DownFile(l, desUrl)
 	fileBytes, _, err := my_util.DownFile(l, desUrl)
 	if err != nil {
 	if err != nil {