Skip to content

Commit

Permalink
Fix linter reported issues
Browse files Browse the repository at this point in the history
Signed-off-by: Chun-Hung Tseng <[email protected]>
  • Loading branch information
henrybear327 committed Aug 16, 2024
1 parent 406670b commit a4adf65
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions db.go
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ func (db *DB) munmap() error {
// return errors.New(unmapError)
if err := munmap(db); err != nil {
db.Logger().Errorf("[GOOS: %s, GOARCH: %s] munmap failed, db.datasz: %d, error: %v", runtime.GOOS, runtime.GOARCH, db.datasz, err)
return fmt.Errorf("unmap error: " + err.Error())
return fmt.Errorf("unmap error: %v", err.Error())
}

return nil
Expand Down Expand Up @@ -593,7 +593,7 @@ func (db *DB) munlock(fileSize int) error {
// return errors.New(munlockError)
if err := munlock(db, fileSize); err != nil {
db.Logger().Errorf("[GOOS: %s, GOARCH: %s] munlock failed, fileSize: %d, db.datasz: %d, error: %v", runtime.GOOS, runtime.GOARCH, fileSize, db.datasz, err)
return fmt.Errorf("munlock error: " + err.Error())
return fmt.Errorf("munlock error: %v", err.Error())
}
return nil
}
Expand All @@ -603,7 +603,7 @@ func (db *DB) mlock(fileSize int) error {
// return errors.New(mlockError)
if err := mlock(db, fileSize); err != nil {
db.Logger().Errorf("[GOOS: %s, GOARCH: %s] mlock failed, fileSize: %d, db.datasz: %d, error: %v", runtime.GOOS, runtime.GOARCH, fileSize, db.datasz, err)
return fmt.Errorf("mlock error: " + err.Error())
return fmt.Errorf("mlock error: %v", err.Error())
}
return nil
}
Expand Down

0 comments on commit a4adf65

Please sign in to comment.