package main import ( "fmt" ) // setTitle prints the escape sequence to change the terminal title. func setTerminalTitle(title string) { fmt.Printf("\033]2;%s\007", title) } // resetTitle prints the escape sequence to clear the title. // Most terminals will revert to their default profile title. func resetTerminalTitle() { fmt.Printf("\033]2;\007") }