From 23dc1eaeff85fcef4ed6d0c6716a9ea0dbe657fb Mon Sep 17 00:00:00 2001 From: timerzz Date: Wed, 11 Dec 2024 13:22:19 +0800 Subject: [PATCH] feat UrlToMetadata --- pkg/health-check/health.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/health-check/health.go b/pkg/health-check/health.go index ca41803..a9fa333 100644 --- a/pkg/health-check/health.go +++ b/pkg/health-check/health.go @@ -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