Fix lint
This commit is contained in:
parent
d37b7a9729
commit
2039305900
|
@ -20,8 +20,8 @@ type YoutubeOembedData struct {
|
||||||
|
|
||||||
type GiphyOembedData struct {
|
type GiphyOembedData struct {
|
||||||
ProviderName string `json:"provider_name"`
|
ProviderName string `json:"provider_name"`
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
URL string `json:"url"`
|
URL string `json:"url"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type TenorOembedData struct {
|
type TenorOembedData struct {
|
||||||
|
@ -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