Created AppendReadWriter and PreambleReadWriter interfaces for file handling in the log and preamble packages respectively.

Seek to the beginning of the preamble file after truncating.
This commit is contained in:
Kelvin Clement Mwinuka
2024-02-25 15:16:27 +08:00
parent f2e32d8b4f
commit 8d7fe0225a
6 changed files with 439 additions and 395 deletions

View File

@@ -105,7 +105,7 @@ func NewServer(opts Opts) *Server {
KeyUnlock: server.KeyUnlock,
SetValue: server.SetValue,
HandleCommand: server.handleCommand,
}, nil)
}, nil, nil)
if err != nil {
log.Println(err)
}