mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 00:01:10 +08:00
25w28b
This commit is contained in:
parent
ab77c5c7da
commit
bed6c486dc
6 changed files with 16 additions and 3 deletions
|
|
@ -243,6 +243,8 @@ func extractParts(rawURL string) (string, string, string, url.Values, error) {
|
|||
return repoOwner, repoName, remainingPath, queryParams, nil
|
||||
}
|
||||
|
||||
var urlPattern = regexp.MustCompile(`https?://[^\s'"]+`)
|
||||
|
||||
// processLinks 处理链接,返回包含处理后数据的 io.Reader
|
||||
func processLinks(input io.Reader, compress string, host string, cfg *config.Config) (readerOut io.Reader, written int64, err error) {
|
||||
pipeReader, pipeWriter := io.Pipe() // 创建 io.Pipe
|
||||
|
|
@ -315,7 +317,6 @@ func processLinks(input io.Reader, compress string, host string, cfg *config.Con
|
|||
}()
|
||||
|
||||
// 使用正则表达式匹配 http 和 https 链接
|
||||
urlPattern := regexp.MustCompile(`https?://[^\s'"]+`)
|
||||
for {
|
||||
line, readErr := bufReader.ReadString('\n')
|
||||
if readErr != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue