mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-07-12 16:02:05 +08:00
feat: refactor jsParser to use ParserMethod constants and remove redundant locking in ParseWithContext
This commit is contained in:
@@ -32,8 +32,6 @@ var (
|
||||
|
||||
func ParseWithContext(ctx context.Context, url string) (*parser.Item, error) {
|
||||
doConfig.Do(func() {
|
||||
parsersMu.Lock()
|
||||
defer parsersMu.Unlock()
|
||||
if len(parsers) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user