From aa3454f2c86fdcfb371cca75794ed6c54042b5c8 Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Mon, 20 Feb 2017 18:12:46 +0000 Subject: [PATCH] Inline redundant variable --- src/github.com/matrix-org/go-neb/services/imgur/imgur.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/github.com/matrix-org/go-neb/services/imgur/imgur.go b/src/github.com/matrix-org/go-neb/services/imgur/imgur.go index 1da41d3..4019aca 100644 --- a/src/github.com/matrix-org/go-neb/services/imgur/imgur.go +++ b/src/github.com/matrix-org/go-neb/services/imgur/imgur.go @@ -194,11 +194,11 @@ func (s *Service) text2imgImgur(query string) (*imgurGalleryImage, *imgurGallery log.Info("Searching Imgur for an image of a ", query) query = url.QueryEscape(query) - var base = "https://api.imgur.com/3/gallery/search" + var sort = "time" // time | viral | top var window = "all" // day | week | month | year | all var page = 1 - var urlString = fmt.Sprintf("%s/%s/%s/%d?q=%s", base, sort, window, page, query) + var urlString = fmt.Sprintf("%s/%s/%s/%d?q=%s", "https://api.imgur.com/3/gallery/search", sort, window, page, query) // var urlString = fmt.Sprintf("%s?q=%s", base, query) u, err := url.Parse(urlString)