From e6c2f91a842d2ea462fc58eb4df60a2ccd9bd30d Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Sun, 7 Jul 2024 23:39:12 +0300 Subject: [PATCH] fix: use linkFirst instead of empty string link Signed-off-by: HeshamTB --- ytlinkprov/cache_provider.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ytlinkprov/cache_provider.go b/ytlinkprov/cache_provider.go index d01411e..a54cb8c 100644 --- a/ytlinkprov/cache_provider.go +++ b/ytlinkprov/cache_provider.go @@ -2,7 +2,6 @@ package ytlinkprov import ( "context" - "errors" "fmt" "net/http" "strings" @@ -85,7 +84,7 @@ func getRemoteLink(id string) (string, error) { linkFirst := strings.Split(ytRes.Stdout, "\n")[0] /* Get the last link in a chain of 3XX codes*/ - resp, err := http.Get(link) + resp, err := http.Get(linkFirst) if err != nil { return "", err }