Commit Graph

6 Commits

Author SHA1 Message Date
Jes Cok
88a1bc3170 server/proxy/tcpproxy: reuse addr in TCPProxy.Run
"addr" is the result of net.JoinHostPort which supports IPv6 address.

Rather than ranging "tp.Endpoints" again, it's better to reuse
"addr" in the first loop to collect "eps".

See #7942 and #7943 for context.

Signed-off-by: Jes Cok <xigua67damn@gmail.com>
2025-01-15 22:08:23 +08:00
Jes Cok
a2156a0f9c server/proxy/tcpproxy: use net.JoinHostPort rather than formatAddr
formatAddr is just like net.JoinHostPort, I think we can use net.JoinHostPort
directly, it's simpler and clearer.

Signed-off-by: Jes Cok <xigua67damn@gmail.com>
2024-04-21 23:28:51 +08:00
demoManito
72cf0cc04a etcd: modify declaring empty slices
declare an empty slice to var s []int replace  s :=[]int{}, https://github.com/golang/go/wiki/CodeReviewComments#declaring-empty-slices

Signed-off-by: demoManito <1430482733@qq.com>
2022-09-16 14:41:14 +08:00
ahrtr
8d8247b092 format listenning address correctly for IPv6 ip address 2022-01-18 06:11:33 +08:00
Eng Zer Jun
2a151c8982
*: move from io/ioutil to io and os packages
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2021-10-28 00:05:28 +08:00
Piotr Tabor
4a5e9d1261 server: Move server files to 'server' directory.
26  git mv mvcc wal auth etcdserver etcdmain proxy embed/ lease/ server
   36  git mv go.mod go.sum server
2020-10-26 12:57:19 +01:00