mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-10 23:54:05 -08:00
f79b55d057
The usage of govalidator is redundant with the call to url.Parse for url validation. Removing it has the following benefits: - The explicit error message is displayed instead of just a generic valid/invalid message - Slightly smaller code with one fewer external dependency - Speed improvement by removing duplicate call to url.Parse (inside govalidator.IsURL() - Resolves issue #2717 The only potential drawback of removing govalidator is that certain URLs will be considered valid which were previously invalid. For example: - URLs with hostnames that start and/or end with an underscore (http://_example.com_) - URLs with hostnames that contain some special characters (http://foo&*bar.org) These are valid URIs according to RFC 3986 and valid domain names per RFC 2181, however they are not valid hostnames per RFC 952. |
||
---|---|---|
.. | ||
github.com | ||
golang.org/x | ||
google.golang.org | ||
gopkg.in | ||
k8s.io | ||
vendor.json |