Fix linter

This commit is contained in:
Ben Johnson 2020-11-10 07:07:06 -07:00
parent 52340212f6
commit 78eb9e0711
2 changed files with 0 additions and 21 deletions

View file

@ -672,22 +672,6 @@ func RowValues(b []uint64) []uint64 {
// return fmt.Sprintf("%s:%d", file, line)
// }
// truncate truncates the file at path to sz bytes. File must exist.
func (db *DB) truncate(path string, sz int64) error {
f, err := os.OpenFile(path, os.O_WRONLY, 0666)
if err != nil {
return fmt.Errorf("open file: %w", err)
}
defer f.Close()
if err := f.Truncate(sz); err != nil {
return fmt.Errorf("truncate: %w", err)
} else if err := db.fsync(f); err != nil {
return fmt.Errorf("sync: %w", err)
}
return f.Close()
}
func (db *DB) fsync(f *os.File) error {
if !db.cfg.FsyncEnabled {
return nil

View file

@ -962,11 +962,6 @@ func (tx *Tx) writeBitmapPage(pgno uint32, page []byte) error {
return nil
}
func (tx *Tx) writeMetaPage() error {
tx.dirtyPages[0] = tx.meta[:]
return nil
}
func (tx *Tx) AddRoaring(name string, bm *roaring.Bitmap) (changed bool, err error) {
tx.mu.RLock()
defer tx.mu.RUnlock()