refactor: address code review (#3675)

Addresses code review for #3653.
This commit is contained in:
James Elliott 2022-07-08 20:56:22 +10:00 committed by GitHub
parent 3225ecf537
commit 03d56a31ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View File

@ -774,7 +774,6 @@ func TestStringToAddressHookFunc(t *testing.T) {
expected interface{} expected interface{}
err string err string
decode bool decode bool
wantGrps []string
}{ }{
{ {
name: "ShouldDecodeNonPtr", name: "ShouldDecodeNonPtr",

View File

@ -52,7 +52,7 @@ func NewAddressFromURL(u *url.URL) (addr *Address, err error) {
} }
switch addr.Scheme { switch addr.Scheme {
case "tcp", "udp", "http", "https": case "tcp", "udp":
break break
default: default:
return nil, fmt.Errorf("could not parse scheme for address '%s': scheme '%s' is not valid, expected to be one of 'tcp://', 'udp://'", u.String(), addr.Scheme) return nil, fmt.Errorf("could not parse scheme for address '%s': scheme '%s' is not valid, expected to be one of 'tcp://', 'udp://'", u.String(), addr.Scheme)