File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ func (o *Options) crawlFiles() (*Result, error) {
4242 // Create the collector settings
4343 coOptions := []func (* colly.Collector ){
4444 colly .AllowedDomains (allowedDomains ... ),
45- colly .Async (false ),
45+ colly .Async (true ),
4646 }
4747
4848 if o .Verbose {
@@ -92,5 +92,8 @@ func (o *Options) crawlFiles() (*Result, error) {
9292 }
9393 }
9494
95+ // Wait until colly goroutines are finished.
96+ co .Wait ()
97+
9598 return & Result {BaseNames : files , URLs : urls }, nil
9699}
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ func (o *Options) crawlFolders() (*Result, error) {
4343 // Create the collector settings
4444 coOptions := []func (* colly.Collector ){
4545 colly .AllowedDomains (allowedDomains ... ),
46- colly .Async (false ),
46+ colly .Async (true ),
4747 }
4848
4949 if o .Verbose {
@@ -100,5 +100,8 @@ func (o *Options) crawlFolders() (*Result, error) {
100100 }
101101 }
102102
103+ // Wait until colly goroutines are finished.
104+ co .Wait ()
105+
103106 return & Result {BaseNames : folders , URLs : urls }, nil
104107}
You can’t perform that action at this time.
0 commit comments