feat: init commit

This commit is contained in:
krau
2024-10-10 23:31:01 +08:00
commit 1cbcebc148
31 changed files with 1673 additions and 0 deletions

18
common/req.go Normal file
View File

@@ -0,0 +1,18 @@
package common
import (
"path/filepath"
"github.com/imroc/req/v3"
"github.com/krau/SaveAny-Bot/config"
)
var ReqClient *req.Client
func initClient() {
ReqClient = req.NewClient().SetOutputDirectory(config.Cfg.Temp.BasePath)
}
func GetDownloadedFilePath(filename string) string {
return filepath.Join(config.Cfg.Temp.BasePath, filename)
}