Skip to content

Fix ResetLine by using string formatting#23

Merged
buger merged 1 commit intobuger:masterfrom
tfogo:master
Apr 23, 2018
Merged

Fix ResetLine by using string formatting#23
buger merged 1 commit intobuger:masterfrom
tfogo:master

Conversation

@tfogo
Copy link
Contributor

@tfogo tfogo commented Apr 16, 2018

Hi! It looks like ResetLine wasn't working as expected. See this example code:

package main

import (
  "github.com/buger/goterm"
)

func main() {
  goterm.Println("First Line")
  goterm.Flush()
  goterm.MoveCursorUp(2)
  goterm.Println(goterm.ResetLine("Second Line"))
  goterm.Flush()
}

The expected output is: Second Line but instead the output is %!(EXTRA string=Second Line) since the Sprintf looks incorrect in ResetLine.

@buger buger merged commit 6d19e6a into buger:master Apr 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants