diff --git a/cwriter/writer.go b/cwriter/writer.go index bb50336..80a167f 100644 --- a/cwriter/writer.go +++ b/cwriter/writer.go @@ -3,7 +3,6 @@ import ( "bytes" "errors" - "fmt" "io" "os" @@ -13,7 +12,7 @@ // NotATTY not a TeleTYpewriter error. var NotATTY = errors.New("not a terminal") -var cuuAndEd = fmt.Sprintf("%c[%%dA%[1]c[J", 27) +const cuuAndEd = "\x1b[%dA\x1b[J" // Writer is a buffered the writer that updates the terminal. The // contents of writer will be flushed when Flush is called.