Skip to content

Commit

Permalink
fixes lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushsatyam146 committed Dec 3, 2024
1 parent 602c8c4 commit 503f91a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/wal/wal_aof.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,12 @@ func (wal *WALAOF) Init(t time.Time) error {
wal.currentSegmentIndex = 0
wal.oldestSegmentIndex = 0
wal.byteOffset = 0
wal.currentSegmentFile, err = os.OpenFile(filepath.Join(wal.logDir, "seg-0"), os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
newFile, err := os.OpenFile(filepath.Join(wal.logDir, "seg-0"), os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
if err != nil {
return err
}
wal.currentSegmentFile = newFile

if _, err := wal.currentSegmentFile.Seek(0, io.SeekEnd); err != nil {
return err
}
Expand Down

0 comments on commit 503f91a

Please sign in to comment.