diff options
author | Oleksandr Redko <oleksandr.red+github@gmail.com> | 2023-02-10 15:34:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-10 21:34:49 +0800 |
commit | f84e2346ba6209d0527234bd38d736d2bf5052c0 (patch) | |
tree | 089fe472a2980d3e7274f581c0c29979a2c3c8de /tcpdialer.go | |
parent | Add missing fasthttp prefix in example usage (#1487) (diff) | |
download | fasthttp-f84e2346ba6209d0527234bd38d736d2bf5052c0.tar.gz fasthttp-f84e2346ba6209d0527234bd38d736d2bf5052c0.tar.bz2 fasthttp-f84e2346ba6209d0527234bd38d736d2bf5052c0.zip |
Rename unexported funcs, vars to match common Go (#1488)
See https://github.com/golang/go/wiki/CodeReviewComments#initialisms
and https://go.dev/doc/effective_go#mixed-caps
Diffstat (limited to 'tcpdialer.go')
-rw-r--r-- | tcpdialer.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tcpdialer.go b/tcpdialer.go index 5f70b77..c26ec3c 100644 --- a/tcpdialer.go +++ b/tcpdialer.go @@ -338,8 +338,8 @@ func (d *TCPDialer) tryDial(network string, addr *net.TCPAddr, deadline time.Tim dialer.LocalAddr = d.LocalAddr } - ctx, cancel_ctx := context.WithDeadline(context.Background(), deadline) - defer cancel_ctx() + ctx, cancelCtx := context.WithDeadline(context.Background(), deadline) + defer cancelCtx() conn, err := dialer.DialContext(ctx, network, addr.String()) if err != nil && ctx.Err() == context.DeadlineExceeded { return nil, ErrDialTimeout |