etcdserver: fixes shadowed variables for go tool vet

Fix for https://github.com/coreos/etcd/issues/3954.
This commit is contained in:
Gyu-Ho Lee
2015-12-12 04:25:27 -08:00
parent bccc602c8f
commit 40b11038f2
3 changed files with 7 additions and 7 deletions

View File

@ -78,7 +78,7 @@ func getClusterFromRemotePeers(urls []string, timeout time.Duration, logerr bool
continue
}
var membs []*Member
if err := json.Unmarshal(b, &membs); err != nil {
if err = json.Unmarshal(b, &membs); err != nil {
if logerr {
plog.Warningf("could not unmarshal cluster response: %v", err)
}
@ -246,7 +246,7 @@ func getVersion(m *Member, rt http.RoundTripper) (*version.Versions, error) {
continue
}
var vers version.Versions
if err := json.Unmarshal(b, &vers); err != nil {
if err = json.Unmarshal(b, &vers); err != nil {
plog.Warningf("failed to unmarshal the response body got from the peerURL(%s) of member %s (%v)", u, m.ID, err)
continue
}