go - How can I clear the console with golang in windows? -
i've tried lot of ways, like
package main import ( "os" "os/exec" ) func main() { c := exec.command("cls") c.stdout = os.stdout c.run() }
and
c.system(c.cstring("cls"))
and escape sequence doesn't work either
all need :
package main import ( "os" "os/exec" ) func main() { cmd := exec.command("cmd", "/c", "cls") cmd.stdout = os.stdout cmd.run() }
Comments
Post a Comment