From 319c91cc14d569737d0668a1431669e5749df50d Mon Sep 17 00:00:00 2001 From: Helin Wang Date: Thu, 25 May 2017 15:53:57 -0400 Subject: [PATCH] make variable name more expressive --- go/pserver/client.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/go/pserver/client.go b/go/pserver/client.go index 5e01d60a8..ad0d2bcb0 100644 --- a/go/pserver/client.go +++ b/go/pserver/client.go @@ -137,9 +137,9 @@ func (c *Client) SendGrads(grads []Gradient) error { } type result struct { - idx int - p Parameter - err error + idx int + param Parameter + err error } type results []result @@ -164,7 +164,7 @@ func (c *Client) GetParams(names []string) ([]Parameter, error) { go func(name string, idx int) { var parameter Parameter err := c.pservers[c.partition(name)].Call("Service.GetParam", name, ¶meter) - rCh <- result{idx: idx, p: parameter, err: err} + rCh <- result{idx: idx, param: parameter, err: err} }(name, idx) } @@ -185,7 +185,7 @@ func (c *Client) GetParams(names []string) ([]Parameter, error) { ps := make([]Parameter, len(rs)) for i := range rs { - ps[i] = rs[i].p + ps[i] = rs[i].param } return ps, nil -- GitLab