From 8be76283f17cd2433178a1512b9c66fa4c7eb7c7 Mon Sep 17 00:00:00 2001 From: shenli Date: Mon, 23 Nov 2015 10:28:29 +0800 Subject: [PATCH] *: Fix go vet errors Fix following errors: store/localstore/isolation_test.go:80: declaration of err shadows declaration at store/localstore/isolation_test.go:59: store/localstore/isolation_test.go:98: declaration of err shadows declaration at store/localstore/isolation_test.go:59: --- store/localstore/isolation_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/store/localstore/isolation_test.go b/store/localstore/isolation_test.go index 91676cbbc7..0bc0899447 100644 --- a/store/localstore/isolation_test.go +++ b/store/localstore/isolation_test.go @@ -77,9 +77,9 @@ func (t *testIsolationSuite) TestMultiInc(c *C) { for j := 0; j < incCnt; j++ { err = kv.RunInNewTxn(store, true, func(txn kv.Transaction) error { for _, key := range keys { - _, err := txn.Inc(key, 1) - if err != nil { - return err + _, err1 := txn.Inc(key, 1) + if err1 != nil { + return err1 } } @@ -95,9 +95,9 @@ func (t *testIsolationSuite) TestMultiInc(c *C) { for i := 0; i < keyCnt; i++ { err = kv.RunInNewTxn(store, false, func(txn kv.Transaction) error { for _, key := range keys { - id, err := txn.GetInt64(key) - if err != nil { - return err + id, err1 := txn.GetInt64(key) + if err1 != nil { + return err1 } c.Assert(id, Equals, int64(threadCnt*incCnt)) }