Skip to content

Instantly share code, notes, and snippets.

@jen6
Last active November 24, 2017 09:49
Show Gist options
  • Select an option

  • Save jen6/afb6ea063ac4572e1f5d6673de3dd15f to your computer and use it in GitHub Desktop.

Select an option

Save jen6/afb6ea063ac4572e1f5d6673de3dd15f to your computer and use it in GitHub Desktop.
for i, clink := range childLinks {
rch := make(chan interface{})
resultChannels[i] = rch
duplicateLink, ok := linkMap.Load(clink.FullLink)
if ok {
fmt.Println("-----------------------")//if remove 26 sec | now 12 sec
*clink = *duplicateLink.(*link.Link)
go func() {
rch <- struct{}{}
}()
} else {
go fetch(clink, rch, redirectionDepth)
linkMap.Store(clink.FullLink, clink)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment