The term package implements PTY creation and termios get/set attributes. It also contains some convenience functions for colors, SSH <> termios translations, readCh , reading passwords etc.
The PTY and termios parts are Linux specific.
go get github.com/google/goterm/term
package main
import (
"fmt"
"github.com/google/goterm/term"
)
func main() {
fmt.Println(term.Blue("Hello blue world"))
}