*: 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:
This commit is contained in:
@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user