From 25738336021374e87dbf407747ac6f5e022e3687 Mon Sep 17 00:00:00 2001 From: Kevin Burke Date: Sat, 28 Apr 2018 13:41:22 -0700 Subject: [PATCH] remove unused code and prep for 0.4 release --- README.md | 4 ++-- lib/tss.go | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ccb8fea..0291beb 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,9 @@ line printed. [Find your target operating system](https://github.com/kevinburke/tss/releases) (darwin, windows, linux) and desired bin directory, and modify the command below as appropriate: - curl --silent --location --output /usr/local/bin/tss https://github.com/kevinburke/tss/releases/download/0.3/tss-linux-amd64 && chmod 755 /usr/local/bin/tss + curl --silent --location --output /usr/local/bin/tss https://github.com/kevinburke/tss/releases/download/0.4/tss-linux-amd64 && chmod 755 /usr/local/bin/tss -The latest version is 0.3. +The latest version is 0.4. If you have a Go development environment, you can also install via source code: diff --git a/lib/tss.go b/lib/tss.go index b9900dd..756f6d7 100644 --- a/lib/tss.go +++ b/lib/tss.go @@ -34,7 +34,6 @@ func (w *Writer) Write(p []byte) (int, error) { wrote := 0 now := time.Now() pos := 0 - var sbuf [9]byte for { // write everything up to the next newline if w.endOfLine { @@ -43,7 +42,6 @@ func (w *Writer) Write(p []byte) (int, error) { s := TimeScaler(sinceStart) for i := 0; i < 8-len(s); i++ { w.buf.WriteByte(' ') - sbuf[i] = ' ' } w.buf.WriteString(s) w.buf.WriteByte(' ') @@ -67,6 +65,7 @@ func (w *Writer) Write(p []byte) (int, error) { wrote += idx + 1 pos += idx + 1 w.endOfLine = true + w.lastLine = now if pos >= len(p) { break }