feat: update parser interface to include context in Parse method
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
package parser
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/md5"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type Parser interface {
|
||||
CanHandle(url string) bool
|
||||
Parse(url string) (*Item, error)
|
||||
Parse(ctx context.Context, url string) (*Item, error)
|
||||
}
|
||||
|
||||
// Resource is a single downloadable resource with metadata.
|
||||
|
||||
Reference in New Issue
Block a user