🚨 Removed linter warnings
This commit is contained in:
parent
236e5ee8e8
commit
e83a0ea4ca
|
@ -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)
|
||||||
|
|
|
@ -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"
|
||||||
|
|
4
types.go
4
types.go
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue