|
|
@@ -4,6 +4,8 @@ import (
|
|
|
"fmt"
|
|
|
"github.com/go-resty/resty/v2"
|
|
|
"net/http"
|
|
|
+ "os"
|
|
|
+ "path"
|
|
|
"regexp"
|
|
|
"strings"
|
|
|
)
|
|
|
@@ -86,6 +88,16 @@ func AddBaseUrl(baseUrl, url string) string {
|
|
|
return fmt.Sprintf("%s%s", baseUrl, url)
|
|
|
}
|
|
|
|
|
|
+func GetDebugFolder() (string, error) {
|
|
|
+ nowProcessRoot, _ := os.Getwd()
|
|
|
+ nowProcessRoot = path.Join(nowProcessRoot, DebugFolder)
|
|
|
+ err := os.MkdirAll(nowProcessRoot, os.ModePerm)
|
|
|
+ if err != nil {
|
|
|
+ return "", err
|
|
|
+ }
|
|
|
+ return nowProcessRoot, err
|
|
|
+}
|
|
|
+
|
|
|
// ReqParam 可选择传入的参数
|
|
|
type ReqParam struct {
|
|
|
UserExtList []string // 用户确认的视频后缀名支持列表
|