generated from kedaya_haitao/template
feat UrlToMetadata
This commit is contained in:
parent
a581c72a65
commit
23dc1eaeff
@ -51,7 +51,7 @@ func HTTPGetViaProxy(ctx context.Context, clashProxy C.Proxy, url string) error
|
||||
ctx, cancel := context.WithTimeout(ctx, time.Duration(config.Config.HealthCheckTimeout)*time.Second)
|
||||
defer cancel()
|
||||
|
||||
addr, err := urlToMetadata(url)
|
||||
addr, err := UrlToMetadata(url)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -107,7 +107,7 @@ func HTTPGetViaProxy(ctx context.Context, clashProxy C.Proxy, url string) error
|
||||
return nil
|
||||
}
|
||||
|
||||
func urlToMetadata(rawURL string) (addr C.Metadata, err error) {
|
||||
func UrlToMetadata(rawURL string) (addr C.Metadata, err error) {
|
||||
u, err := url.Parse(rawURL)
|
||||
if err != nil {
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user