From 1eba1730d1af50ed545f4fde78b22d6fb62ca11e Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sat, 28 Apr 2018 10:51:07 -0700 Subject: Move HTTP client to its own package --- reader/icon/finder.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'reader/icon') diff --git a/reader/icon/finder.go b/reader/icon/finder.go index 2e7cb16..296ddec 100644 --- a/reader/icon/finder.go +++ b/reader/icon/finder.go @@ -12,7 +12,7 @@ import ( "strings" "github.com/miniflux/miniflux/crypto" - "github.com/miniflux/miniflux/http" + "github.com/miniflux/miniflux/http/client" "github.com/miniflux/miniflux/logger" "github.com/miniflux/miniflux/model" "github.com/miniflux/miniflux/url" @@ -23,8 +23,8 @@ import ( // FindIcon try to find the website's icon. func FindIcon(websiteURL string) (*model.Icon, error) { rootURL := url.RootURL(websiteURL) - client := http.NewClient(rootURL) - response, err := client.Get() + clt := client.New(rootURL) + response, err := clt.Get() if err != nil { return nil, fmt.Errorf("unable to download website index page: %v", err) } @@ -87,8 +87,8 @@ func parseDocument(websiteURL string, data io.Reader) (string, error) { } func downloadIcon(iconURL string) (*model.Icon, error) { - client := http.NewClient(iconURL) - response, err := client.Get() + clt := client.New(iconURL) + response, err := clt.Get() if err != nil { return nil, fmt.Errorf("unable to download iconURL: %v", err) } -- cgit v1.2.3