From 93c987a6cb702443f788d1a7847855b3f8d7c907 Mon Sep 17 00:00:00 2001 From: Birkhoff Lee Date: Sun, 28 Jun 2020 10:59:04 +0800 Subject: [PATCH] Fix: typo in dialer.go (#767) --- component/dialer/dialer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/component/dialer/dialer.go b/component/dialer/dialer.go index 5cb9badb..f0f575a3 100644 --- a/component/dialer/dialer.go +++ b/component/dialer/dialer.go @@ -66,7 +66,7 @@ func DialContext(ctx context.Context, network, address string) (net.Conn, error) } return dialer.DialContext(ctx, network, net.JoinHostPort(ip.String(), port)) case "tcp", "udp": - return dualStackDailContext(ctx, network, address) + return dualStackDialContext(ctx, network, address) default: return nil, errors.New("network invalid") } @@ -88,7 +88,7 @@ func ListenPacket(network, address string) (net.PacketConn, error) { return lc.ListenPacket(context.Background(), network, address) } -func dualStackDailContext(ctx context.Context, network, address string) (net.Conn, error) { +func dualStackDialContext(ctx context.Context, network, address string) (net.Conn, error) { host, port, err := net.SplitHostPort(address) if err != nil { return nil, err