🚨 Removed linter warnings
This commit is contained in:
parent
236e5ee8e8
commit
e83a0ea4ca
3 changed files with 4 additions and 3 deletions
|
@ -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)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// Package oembed add utils for supporting oEmbed fetching data,
|
||||
package oembed
|
||||
|
||||
import "golang.org/x/xerrors"
|
||||
|
|
4
types.go
4
types.go
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue