aboutsummaryrefslogtreecommitdiffhomepage
path: root/reader/icon
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2018-04-28 10:51:07 -0700
committerGravatar Frédéric Guillot <fred@miniflux.net>2018-04-28 10:51:07 -0700
commit1eba1730d1af50ed545f4fde78b22d6fb62ca11e (patch)
tree61f99282f66529b42625a8f335593bdcb461459c /reader/icon
parent04adf5fdf53951f270923c41171a52575db53e46 (diff)
Move HTTP client to its own package
Diffstat (limited to 'reader/icon')
-rw-r--r--reader/icon/finder.go10
1 files changed, 5 insertions, 5 deletions
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)
}