Skip to content

Commit

Permalink
Renamed common/config.go's SupportedURL to SupportedProtocol as sugge…
Browse files Browse the repository at this point in the history
…sted by @SwampDragons.
  • Loading branch information
arizvisa committed Feb 3, 2018
1 parent 97fc9c0 commit c98a074
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions common/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ func ChooseString(vals ...string) string {
return ""
}

// SupportedURL verifies that the url passed is actually supported or not
// SupportedProtocol verifies that the url passed is actually supported or not
// This will also validate that the protocol is one that's actually implemented.
func SupportedURL(u *url.URL) bool {
func SupportedProtocol(u *url.URL) bool {
// url.Parse shouldn't return nil except on error....but it can.
if u == nil {
return false
Expand Down Expand Up @@ -159,7 +159,7 @@ func ValidatedURL(original string) (string, error) {
}

// We should now have a url, so verify that it's a protocol we support.
if !SupportedURL(u) {
if !SupportedProtocol(u) {
return "", fmt.Errorf("Unsupported protocol scheme! (%#v)", u)
}

Expand Down

0 comments on commit c98a074

Please sign in to comment.