mirror of
https://github.com/quarkcloudio/quark-go.git
synced 2025-10-05 07:56:58 +08:00
chore: 优化下载静态文件失败提示信息
This commit is contained in:
@@ -19,8 +19,10 @@ const CONTENT = "https://raw.githubusercontent.com"
|
||||
|
||||
var urlPattern = regexp.MustCompile(`<a class="js-navigation-open.*?".*?title="(.*?)".*?href="(.*?)".*?>`)
|
||||
var repositoryPattern = regexp.MustCompile(`(/.*?/.*?/)blob/(.*$)`)
|
||||
var respositoryDownloadURL = ""
|
||||
|
||||
func Download(respositoryURL string, path string) {
|
||||
respositoryDownloadURL = respositoryURL
|
||||
if respositoryURL == "" {
|
||||
fmt.Println("please specify the github url!")
|
||||
return
|
||||
@@ -50,7 +52,7 @@ func Download(respositoryURL string, path string) {
|
||||
// failedPrint
|
||||
func failedPrint(err error) {
|
||||
if err != nil {
|
||||
fmt.Println("Download static files failed! \n Please goto https://github.com/quarkcms/quark-go/tree/main/website url to download it \n After downloading, you must make 'install.lock' file in the website dir")
|
||||
fmt.Println("The static file download failed. Please go to the url:" + respositoryDownloadURL + " to download and copy it to the project root directory, and create an install.lock lock file in the website directory.\n\n")
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user