21 lines
305 B
Go
21 lines
305 B
Go
|
package crawler
|
||
|
|
||
|
import (
|
||
|
"git.loafle.net/overflow/crawler-go"
|
||
|
)
|
||
|
|
||
|
var crawlers map[string]crawler.Crawler
|
||
|
|
||
|
func init() {
|
||
|
crawlers = make(map[string]crawler.Crawler, 0)
|
||
|
}
|
||
|
|
||
|
func addCrawler(c crawler.Crawler) {
|
||
|
crawlers[c.Name()] = c
|
||
|
|
||
|
}
|
||
|
|
||
|
func GetCrawlers() map[string]crawler.Crawler {
|
||
|
return crawlers
|
||
|
}
|