Fix lint
This commit is contained in:
parent
d37b7a9729
commit
2039305900
|
@ -30,7 +30,6 @@ type TenorOembedData struct {
|
||||||
AuthorName string `json:"author_name"`
|
AuthorName string `json:"author_name"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
type LinkPreviewData struct {
|
type LinkPreviewData struct {
|
||||||
Site string `json:"site" meta:"og:site_name"`
|
Site string `json:"site" meta:"og:site_name"`
|
||||||
Title string `json:"title" meta:"og:title"`
|
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 GiphyOembedLink = "https://giphy.com/services/oembed?url=%s"
|
||||||
const TenorOembedLink = "https://tenor.com/oembed?url=%s"
|
const TenorOembedLink = "https://tenor.com/oembed?url=%s"
|
||||||
|
|
||||||
|
|
||||||
var httpClient = http.Client{
|
var httpClient = http.Client{
|
||||||
Timeout: 30 * time.Second,
|
Timeout: 30 * time.Second,
|
||||||
}
|
}
|
||||||
|
@ -84,7 +82,6 @@ func LinkPreviewWhitelist() []Site {
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetURLContent(url string) (data []byte, err error) {
|
func GetURLContent(url string) (data []byte, err error) {
|
||||||
|
|
||||||
// nolint: gosec
|
// nolint: gosec
|
||||||
response, err := httpClient.Get(url)
|
response, err := httpClient.Get(url)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue