impl ledger.Files.TempGet/SetLastNLines

main
bel 2023-10-29 09:14:10 -06:00
parent 569e50b162
commit a623dcc195
1 changed files with 1 additions and 2 deletions

View File

@ -3,7 +3,6 @@ package ledger
import (
"bufio"
"bytes"
"errors"
"fmt"
"io"
"io/fs"
@ -56,7 +55,7 @@ func (files Files) TempSetLastNLines(n int, lines []string) error {
fmt.Fprintln(w, lines[i])
}
return errors.New(w.Name())
return os.Rename(w.Name(), p)
}
func peekLastNLines(w io.Writer, r *bufio.Reader, n int) ([]string, error) {