提交 319c91cc 编写于 作者: H Helin Wang

make variable name more expressive

上级 c2255287
...@@ -138,7 +138,7 @@ func (c *Client) SendGrads(grads []Gradient) error { ...@@ -138,7 +138,7 @@ func (c *Client) SendGrads(grads []Gradient) error {
type result struct { type result struct {
idx int idx int
p Parameter param Parameter
err error err error
} }
...@@ -164,7 +164,7 @@ func (c *Client) GetParams(names []string) ([]Parameter, error) { ...@@ -164,7 +164,7 @@ func (c *Client) GetParams(names []string) ([]Parameter, error) {
go func(name string, idx int) { go func(name string, idx int) {
var parameter Parameter var parameter Parameter
err := c.pservers[c.partition(name)].Call("Service.GetParam", name, &parameter) err := c.pservers[c.partition(name)].Call("Service.GetParam", name, &parameter)
rCh <- result{idx: idx, p: parameter, err: err} rCh <- result{idx: idx, param: parameter, err: err}
}(name, idx) }(name, idx)
} }
...@@ -185,7 +185,7 @@ func (c *Client) GetParams(names []string) ([]Parameter, error) { ...@@ -185,7 +185,7 @@ func (c *Client) GetParams(names []string) ([]Parameter, error) {
ps := make([]Parameter, len(rs)) ps := make([]Parameter, len(rs))
for i := range rs { for i := range rs {
ps[i] = rs[i].p ps[i] = rs[i].param
} }
return ps, nil return ps, nil
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册