Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Commit 6c066b6

Browse files
author
fbockaj
committed
Drop else and outdent
1 parent a12dd00 commit 6c066b6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

config/config.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,9 @@ func validateAddress(addr string, addrName string) error {
6767
host, _, err := net.SplitHostPort(strings.TrimPrefix(addr, protocol))
6868
if err != nil {
6969
return fmt.Errorf("%v is not in the host:port format", addrName)
70-
} else {
71-
if ip := net.ParseIP(host); ip == nil {
72-
return fmt.Errorf("%v is not a valid IPv4 address", addrName)
73-
}
70+
}
71+
if ip := net.ParseIP(host); ip == nil {
72+
return fmt.Errorf("%v is not a valid IPv4 address", addrName)
7473
}
7574

7675
case "unix://":

0 commit comments

Comments
 (0)