From 2039305900246bff06f79fd7598fe8f8d97d9b8d Mon Sep 17 00:00:00 2001 From: Shivek Khurana Date: Wed, 20 Jan 2021 16:54:41 +0530 Subject: [PATCH] Fix lint --- protocol/urls/urls.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/protocol/urls/urls.go b/protocol/urls/urls.go index 3ff4da676..9303d57e5 100644 --- a/protocol/urls/urls.go +++ b/protocol/urls/urls.go @@ -20,8 +20,8 @@ type YoutubeOembedData struct { type GiphyOembedData struct { ProviderName string `json:"provider_name"` - Title string `json:"title"` - URL string `json:"url"` + Title string `json:"title"` + URL string `json:"url"` } type TenorOembedData struct { @@ -30,7 +30,6 @@ type TenorOembedData struct { AuthorName string `json:"author_name"` } - type LinkPreviewData struct { Site string `json:"site" meta:"og:site_name"` Title string `json:"title" meta:"og:title"` @@ -48,7 +47,6 @@ const YoutubeOembedLink = "https://www.youtube.com/oembed?format=json&url=%s" const GiphyOembedLink = "https://giphy.com/services/oembed?url=%s" const TenorOembedLink = "https://tenor.com/oembed?url=%s" - var httpClient = http.Client{ Timeout: 30 * time.Second, } @@ -84,7 +82,6 @@ func LinkPreviewWhitelist() []Site { } func GetURLContent(url string) (data []byte, err error) { - // nolint: gosec response, err := httpClient.Get(url) if err != nil {