Chore: code style improvements (#361)

This commit is contained in:
Kirill Motkov
2019-10-14 12:13:23 +03:00
committed by Dreamacro
parent 710cd5aed2
commit f4326daaa4
4 changed files with 12 additions and 10 deletions

View File

@ -33,11 +33,12 @@ func urlToMetadata(rawURL string) (addr C.Metadata, err error) {
port := u.Port()
if port == "" {
if u.Scheme == "https" {
switch u.Scheme {
case "https":
port = "443"
} else if u.Scheme == "http" {
case "http":
port = "80"
} else {
default:
err = fmt.Errorf("%s scheme not Support", rawURL)
return
}