🚨 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) {
provider := findProvider(url)
if provider == nil {
provider = &Provider{Endpoints: []Endpoint{Endpoint{}}}
provider = &Provider{Endpoints: []Endpoint{{}}}
}
_, err := fetchEmbed(url, provider, nil)

View file

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

View file

@ -9,7 +9,7 @@ type (
Endpoints []Endpoint `json:"endpoints"`
}
// Provider represent a single endpoint of Provider
// Endpoint represent a single endpoint of Provider
Endpoint struct {
Schemes []string `json:"schemes,omitempty"`
URL string `json:"url"`
@ -17,7 +17,7 @@ type (
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.
OEmbed struct {
// The resource type.