From a65f5edea0f1f2876eaa72d97e712bd2b7ff8a07 Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Thu, 6 Oct 2022 10:25:00 +0300 Subject: [PATCH] chore: rename DefaultDialer to NewDialer --- options.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/options.go b/options.go index 138d50b4..c2f9c64c 100644 --- a/options.go +++ b/options.go @@ -133,7 +133,7 @@ func (opt *Options) init() { opt.DialTimeout = 5 * time.Second } if opt.Dialer == nil { - opt.Dialer = DefaultDialer(opt) + opt.Dialer = NewDialer(opt) } if opt.PoolSize == 0 { opt.PoolSize = 10 * runtime.GOMAXPROCS(0) @@ -189,9 +189,9 @@ func (opt *Options) clone() *Options { return &clone } -// DefaultDialer returns a function that will be used as the default dialer +// NewDialer returns a function that will be used as the default dialer // when none is specified in Options.Dialer. -func DefaultDialer(opt *Options) func(context.Context, string, string) (net.Conn, error) { +func NewDialer(opt *Options) func(context.Context, string, string) (net.Conn, error) { return func(ctx context.Context, network, addr string) (net.Conn, error) { netDialer := &net.Dialer{ Timeout: opt.DialTimeout,