Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the option to ignore hostnames #22

Closed
novitoll opened this issue Oct 14, 2018 · 2 comments
Closed

Add the option to ignore hostnames #22

novitoll opened this issue Oct 14, 2018 · 2 comments

Comments

@novitoll
Copy link

Either in Relaxed or Strict we may add the condition when we do not want to extract "plain" DNS hostnames, e.g.

IgnoreHostnames:
- http://foo.com -> false
- http://foo.com/123 -> true
- http://foo.com/?bar=123 -> true
@mvdan
Copy link
Owner

mvdan commented Oct 14, 2018

I'm not sure what you mean - do you want to skip all URLs that have no path?

If so, I'd suggest filtering those out yourself, once you have the initial list of matches via this library. For example, you can use net/url.Parse to discard invalid URLs, as well as those with no path.

@novitoll
Copy link
Author

ok, thanks, will use that lib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants