-1

I am trying to get escape sequences to work in a Go application. Specifically the code to move the cursor. fmt.Printf("\033[3;5H") What should I be printing / writing to in order to make this work? Or am I approaching this the wrong way entirely? Every time I run the code I just get some funky looking characters in the terminal or nothing happens. I am running windows 10.

I have tried using multiple different fmt.Print functions but I get the same results.

// Move the cursor
fmt.Printf("\033[3;5H")

// Print at new position
fmt.Printf("Print this text at the new cursor position")
Flimzy
  • 60,850
  • 13
  • 104
  • 147
  • 2
    I don't know Go, by ANSII escape codes don't work in every console. Your console probably isn't compatible if you're sure you have the code right. – Carcigenicate Nov 10 '19 at 05:29

1 Answers1

-1

Turns out you need to enable Virtual Terminal Processing in Windows 10 to use ANSII escape codes

https://github.com/konsorten/go-windows-terminal-sequences