🚨 Removed linter warnings

This commit is contained in:
Maxim Lebedev 2019-05-27 14:43:53 +05:00
parent 236e5ee8e8
commit e83a0ea4ca
No known key found for this signature in database
GPG Key ID: F8978F46FF0FFA4F
3 changed files with 4 additions and 3 deletions

View File

@ -46,7 +46,7 @@ func TestFetchEmbed(t *testing.T) {
t.Run(url, func(t *testing.T) { t.Run(url, func(t *testing.T) {
provider := findProvider(url) provider := findProvider(url)
if provider == nil { if provider == nil {
provider = &Provider{Endpoints: []Endpoint{Endpoint{}}} provider = &Provider{Endpoints: []Endpoint{{}}}
} }
_, err := fetchEmbed(url, provider, nil) _, err := fetchEmbed(url, provider, nil)

View File

@ -1,3 +1,4 @@
// Package oembed add utils for supporting oEmbed fetching data,
package oembed package oembed
import "golang.org/x/xerrors" import "golang.org/x/xerrors"

View File

@ -9,7 +9,7 @@ type (
Endpoints []Endpoint `json:"endpoints"` Endpoints []Endpoint `json:"endpoints"`
} }
// Provider represent a single endpoint of Provider // Endpoint represent a single endpoint of Provider
Endpoint struct { Endpoint struct {
Schemes []string `json:"schemes,omitempty"` Schemes []string `json:"schemes,omitempty"`
URL string `json:"url"` URL string `json:"url"`
@ -17,7 +17,7 @@ type (
Formats []string `json:"formats,omitempty"` Formats []string `json:"formats,omitempty"`
} }
// Response can specify a resource type, such as photo or video. // OEmbed can specify a resource type, such as photo or video.
// Each type has specific parameters associated with it. // Each type has specific parameters associated with it.
OEmbed struct { OEmbed struct {
// The resource type. // The resource type.