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:
parent
a00eb4ff39
commit
ee9fd9802e
3 changed files with 7 additions and 84 deletions
8
util.go
8
util.go
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue