mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-05-11 20:49:41 +08:00
feat: init commit
This commit is contained in:
18
common/req.go
Normal file
18
common/req.go
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user