mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
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>
This commit is contained in:
@@ -96,7 +96,7 @@ func (tp *TCPProxy) Run() error {
|
||||
tp.remotes = append(tp.remotes, &remote{srv: srv, addr: addr})
|
||||
}
|
||||
|
||||
eps := []string{}
|
||||
var eps []string
|
||||
for _, ep := range tp.Endpoints {
|
||||
eps = append(eps, fmt.Sprintf("%s:%d", ep.Target, ep.Port))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user