How to have an in-place string that updates on stdout
I want to output to stdout and have the output "overwrite" the previous output. For example; if I output On 1/10 , I want the next output On 2/10 to overwrite On 1/10 . How can I do this? zzzz stdout is a stream ( io.Writer ). You cannot modify what was already written to it. What can be changed is how that stream's represented in case it is printed to a terminal. Note that there's no good reason to assume this scenario. For example, a user could redirect stdout to a pipe or to a file at will. So the proper approach is to first check: if the stdout is going to a terminal what is that terminal