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