Commit Graph

5 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
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