diff options
author | 2023-11-28 11:05:07 +0000 | |
---|---|---|
committer | 2023-11-28 11:05:07 +0000 | |
commit | 2eb8b8eeb41384dbf34989d7a850b4d498d90064 (patch) | |
tree | 132bd8b2504744945a5af0808782b43163044f69 /vendor/golang.org/x/net/proxy/direct.go | |
parent | [bugfix] Don't copy ptr fields in caches (#2386) (diff) | |
download | gotosocial-2eb8b8eeb41384dbf34989d7a850b4d498d90064.tar.xz |
[chore]: Bump github.com/gorilla/websocket from 1.5.0 to 1.5.1 (#2335)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kim <grufwub@gmail.com>
Diffstat (limited to 'vendor/golang.org/x/net/proxy/direct.go')
-rw-r--r-- | vendor/golang.org/x/net/proxy/direct.go | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/vendor/golang.org/x/net/proxy/direct.go b/vendor/golang.org/x/net/proxy/direct.go new file mode 100644 index 000000000..3d66bdef9 --- /dev/null +++ b/vendor/golang.org/x/net/proxy/direct.go @@ -0,0 +1,31 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package proxy + +import ( + "context" + "net" +) + +type direct struct{} + +// Direct implements Dialer by making network connections directly using net.Dial or net.DialContext. +var Direct = direct{} + +var ( + _ Dialer = Direct + _ ContextDialer = Direct +) + +// Dial directly invokes net.Dial with the supplied parameters. +func (direct) Dial(network, addr string) (net.Conn, error) { + return net.Dial(network, addr) +} + +// DialContext instantiates a net.Dialer and invokes its DialContext receiver with the supplied parameters. +func (direct) DialContext(ctx context.Context, network, addr string) (net.Conn, error) { + var d net.Dialer + return d.DialContext(ctx, network, addr) +} |