Compare commits

...
2 changed files with 12 additions and 1 deletions

No files matched your search

-1
View File
@@ -44,7 +44,6 @@ These are features I'd like to include.
* launch goroutine per fetch
* when there's no Jobs left, and nothing being fetched or parsed, convert the data struct into something useful and output it
## Wishlist
These are features that sound cool but are probably out of scope.
+12
View File
@@ -1,5 +1,10 @@
package main
import (
"fmt"
"os"
)
// docrawl begins crawling the site at "url"
func docrawl(url string) []*Page {
// our result structure
@@ -78,4 +83,11 @@ func docrawl(url string) []*Page {
}
func main() {
// crawl each URL on the command line
for _, u := range os.Args[1:] {
pages := docrawl(u)
l := sitemapToLocations(pages)
j, _ := locationsToJSON(l)
fmt.Println(j)
}
}