mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-22 22:58:25 +00:00
lib/connections: Rename makeTcp -> makeTCP according to go vet's wishes
This commit is contained in:
parent
4b6c2d0d3d
commit
17ed01a0c9
@ -18,13 +18,13 @@ import (
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
for _, network := range []string{"tcp", "tcp4", "tcp6"} {
|
for _, network := range []string{"tcp", "tcp4", "tcp6"} {
|
||||||
dialers[network] = makeTcpDialer(network)
|
dialers[network] = makeTCPDialer(network)
|
||||||
listeners[network] = makeTcpListener(network)
|
listeners[network] = makeTCPListener(network)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func makeTcpDialer(network string) DialerFactory {
|
func makeTCPDialer(network string) DialerFactory {
|
||||||
return func(uri *url.URL, tlsCfg *tls.Config) (*tls.Conn, error) {
|
return func(uri *url.URL, tlsCfg *tls.Config) (*tls.Conn, error) {
|
||||||
// Check that there is a port number in uri.Host, otherwise add one.
|
// Check that there is a port number in uri.Host, otherwise add one.
|
||||||
host, port, err := net.SplitHostPort(uri.Host)
|
host, port, err := net.SplitHostPort(uri.Host)
|
||||||
@ -55,7 +55,7 @@ func makeTcpDialer(network string) DialerFactory {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func makeTcpListener(network string) ListenerFactory {
|
func makeTCPListener(network string) ListenerFactory {
|
||||||
return func(uri *url.URL, tlsCfg *tls.Config, conns chan<- model.IntermediateConnection) {
|
return func(uri *url.URL, tlsCfg *tls.Config, conns chan<- model.IntermediateConnection) {
|
||||||
tcaddr, err := net.ResolveTCPAddr(network, uri.Host)
|
tcaddr, err := net.ResolveTCPAddr(network, uri.Host)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user