Last active
November 24, 2017 09:49
-
-
Save jen6/afb6ea063ac4572e1f5d6673de3dd15f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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