feat: update parser interface to include context in Parse method

This commit is contained in:
krau
2025-08-23 14:01:00 +08:00
parent 231eb61d25
commit 03eb4f8a18
5 changed files with 18 additions and 8 deletions

View File

@@ -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.