accounts,cmd,console,les,metrics: refactor some errors checked by (ST1005) go-staticcheck (#28532)

fix: fix some (ST1005)go-staticcheck
This commit is contained in:
Zoro
2023-11-15 14:36:57 +02:00
committed by GitHub
parent 984f82629c
commit 2814ee0547
15 changed files with 20 additions and 19 deletions
+1 -1
View File
@@ -460,7 +460,7 @@ func ImportLDBData(db ethdb.Database, f string, startIndex int64, interrupt chan
case OpBatchAdd:
batch.Put(key, val)
default:
return fmt.Errorf("unknown op %d\n", op)
return fmt.Errorf("unknown op %d", op)
}
if batch.ValueSize() > ethdb.IdealBatchSize {
if err := batch.Write(); err != nil {