From a0dff5babfa47208250f986712affc3a003f1d03 Mon Sep 17 00:00:00 2001 From: TorchedSammy <38820196+TorchedSammy@users.noreply.github.com> Date: Sat, 5 Mar 2022 15:23:17 -0400 Subject: [PATCH] fix: remove print in history handler --- history.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/history.go b/history.go index 2a7c496..921b6e7 100644 --- a/history.go +++ b/history.go @@ -19,12 +19,11 @@ func newFileHistory() (*fileHistory, error) { return nil, err } } - + itms := []string{""} lines := strings.Split(string(data), "\n") for i, l := range lines { if i == len(lines) - 1 { - println(i, l) continue } itms = append(itms, l) @@ -33,12 +32,12 @@ func newFileHistory() (*fileHistory, error) { if err != nil { return nil, err } - + fh := &fileHistory{ items: itms, f: f, } - + return fh, nil } @@ -52,7 +51,7 @@ func (h *fileHistory) Write(line string) (int, error) { return 0, err } h.f.Sync() - + h.items = append(h.items, line) return len(h.items), nil }