all: reformat

This commit is contained in:
2018-05-29 12:32:24 +02:00
parent 546188fb7d
commit af61b5fd75

View File

@@ -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 havent
// 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) {
// dont 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