[#10] dialer: Fix formatting
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
0e75be2ef2
commit
f65c788d73
1 changed files with 1 additions and 1 deletions
|
@ -209,7 +209,7 @@ func processSubnet(subnet string, sources []iface) (Subnet, error) {
|
||||||
// Hostnames for address are currently not supported.
|
// Hostnames for address are currently not supported.
|
||||||
func (d *dialer) DialContext(ctx context.Context, network, address string) (net.Conn, error) {
|
func (d *dialer) DialContext(ctx context.Context, network, address string) (net.Conn, error) {
|
||||||
addr, err := netip.ParseAddrPort(address)
|
addr, err := netip.ParseAddrPort(address)
|
||||||
if err != nil { //try resolve as hostname
|
if err != nil { // try resolve as hostname
|
||||||
return d.dialContextHostname(ctx, network, address)
|
return d.dialContextHostname(ctx, network, address)
|
||||||
}
|
}
|
||||||
return d.dialAddr(ctx, network, address, addr)
|
return d.dialAddr(ctx, network, address, addr)
|
||||||
|
|
Loading…
Reference in a new issue