Skip to content

Commit

Permalink
Merge "replace fmt.Sprintf to error.Errorf" into release-1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
manish-sethi authored and Gerrit Code Review committed Jul 16, 2019
2 parents aef3bcc + dffb08c commit 34b6107
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/ledger/util/leveldbhelper/leveldb_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func (f *FileLock) Lock() error {
dbOpts.ErrorIfMissing = !dirEmpty
f.db, err = leveldb.OpenFile(f.filePath, dbOpts)
if err != nil && err == syscall.EAGAIN {
return errors.New(fmt.Sprintf("lock is already acquired on file %s", f.filePath))
return errors.Errorf("lock is already acquired on file %s", f.filePath)
}
if err != nil {
panic(fmt.Sprintf("Error acquiring lock on file %s: %s", f.filePath, err))
Expand Down

0 comments on commit 34b6107

Please sign in to comment.