You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
package concurrency
|
|
|
|
type WebsiteChecker func(string) bool
|
|
|
|
func CheckWebsites(wc WebsiteChecker, urls []string) map[string]bool {
|
|
results := make(map[string]bool)
|
|
|
|
for _, url := range urls {
|
|
results[url] = wc(url)
|
|
}
|
|
|
|
return results
|
|
}
|