We should sync.
This commit is contained in:
@@ -1 +1,12 @@
|
||||
# Journal
|
||||
|
||||
## What is this?
|
||||
|
||||
Simplest possible (well, choose your own definition of "simplest") journalling system.
|
||||
|
||||
Run it, it drops you into an editor which lets you write. Ctrl+S to save, Ctrl+C to save
|
||||
and quit.
|
||||
|
||||
## Install
|
||||
|
||||
go install code.ppl.town/justin/journal@latest
|
||||
@@ -33,6 +33,7 @@ type transientMsg struct {
|
||||
type WriteSeekCloser interface {
|
||||
io.WriteSeeker
|
||||
io.Closer
|
||||
Sync() error
|
||||
}
|
||||
|
||||
type model struct {
|
||||
@@ -173,7 +174,8 @@ func (m model) writeFile() error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("write: %w", err)
|
||||
}
|
||||
return nil
|
||||
|
||||
return m.fh.Sync()
|
||||
}
|
||||
|
||||
func (m model) View() tea.View {
|
||||
|
||||
Reference in New Issue
Block a user