Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e867840994 | ||
|
|
5813e948f0 | ||
|
|
e3556df1b1 | ||
|
|
b159dbf636 | ||
|
|
bdc75eca4a |
No files matched your search
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user