Close closes the crawler options resources
()
| 178 | |
| 179 | // Close closes the crawler options resources |
| 180 | func (c *CrawlerOptions) Close() error { |
| 181 | if c.RateLimit != nil { |
| 182 | c.RateLimit.Stop() |
| 183 | } |
| 184 | if c.HostRateLimit != nil { |
| 185 | c.HostRateLimit.Stop() |
| 186 | } |
| 187 | if c.Dialer != nil { |
| 188 | c.Dialer.Close() |
| 189 | } |
| 190 | c.UniqueFilter.Close() |
| 191 | return c.OutputWriter.Close() |
| 192 | } |
| 193 | |
| 194 | func (c *CrawlerOptions) ValidatePath(path string) bool { |
| 195 | if c.ExtensionsValidator != nil { |