[#10] dialer: Fix formatting

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2024-10-08 12:45:32 +03:00
parent 0e75be2ef2
commit f65c788d73
Signed by: dstepanov-yadro
GPG key ID: 237AF1A763293BC0

View file

@ -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)