Changing argument name from urlStr to location. Originally this postfix was added to avoid name collision with the url package. InsercureSkipVerify was accidentally made private.

This commit is contained in:
Renan DelValle 2019-06-10 11:13:07 -07:00
parent a00eb4ff39
commit ee9fd9802e
No known key found for this signature in database
GPG key ID: C240AD6D6F443EC9
3 changed files with 7 additions and 84 deletions

View file

@ -42,14 +42,14 @@ func init() {
}
}
func validateAuroraURL(urlStr string) (string, error) {
func validateAuroraURL(location string) (string, error) {
// If no protocol defined, assume http
if !strings.Contains(urlStr, "://") {
urlStr = "http://" + urlStr
if !strings.Contains(location, "://") {
location = "http://" + location
}
u, err := url.Parse(urlStr)
u, err := url.Parse(location)
if err != nil {
return "", errors.Wrap(err, "error parsing url")