Skip to content

Commit a65f5ed

Browse files
committed
chore: rename DefaultDialer to NewDialer
1 parent a9287a1 commit a65f5ed

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

options.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ func (opt *Options) init() {
133133
opt.DialTimeout = 5 * time.Second
134134
}
135135
if opt.Dialer == nil {
136-
opt.Dialer = DefaultDialer(opt)
136+
opt.Dialer = NewDialer(opt)
137137
}
138138
if opt.PoolSize == 0 {
139139
opt.PoolSize = 10 * runtime.GOMAXPROCS(0)
@@ -189,9 +189,9 @@ func (opt *Options) clone() *Options {
189189
return &clone
190190
}
191191

192-
// DefaultDialer returns a function that will be used as the default dialer
192+
// NewDialer returns a function that will be used as the default dialer
193193
// when none is specified in Options.Dialer.
194-
func DefaultDialer(opt *Options) func(context.Context, string, string) (net.Conn, error) {
194+
func NewDialer(opt *Options) func(context.Context, string, string) (net.Conn, error) {
195195
return func(ctx context.Context, network, addr string) (net.Conn, error) {
196196
netDialer := &net.Dialer{
197197
Timeout: opt.DialTimeout,

0 commit comments

Comments
 (0)