all: reformat
This commit is contained in:
@@ -25,7 +25,6 @@ var Visited = struct {
|
||||
visited map[string]bool
|
||||
}{visited: make(map[string]bool)}
|
||||
|
||||
|
||||
// visitNode inspects the current node and, if it contains a link we haven’t
|
||||
// visited it yet, will spawn a goroutine for it. It will also return that link,
|
||||
// because we have to add it to our list of linked nodes.
|
||||
@@ -119,9 +118,10 @@ func parseRequest(body io.ReadCloser, parent, url string, wg *sync.WaitGroup) {
|
||||
// don’t exit prematurely, since this is all concurrent.
|
||||
func doCrawl(toVisit string, parent string, wg *sync.WaitGroup) {
|
||||
wg.Add(1)
|
||||
resp, err := http.Get(toVisit)
|
||||
defer wg.Done()
|
||||
|
||||
resp, err := http.Get(toVisit)
|
||||
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
return
|
||||
|
Reference in New Issue
Block a user