obr / terminal

Colorful terminal output for Golang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Terminal

Terminal is a simple golang package that provides basic terminal handling.

Terminal wraps color/format functions provided by ANSI escape code

Usage

package main

import (
  "github.com/wsxiaoys/terminal"
  "github.com/wsxiaoys/terminal/color"
)

func main() {
  terminal.Stdout.Color("y").
    Print("Hello world").Nl().
    Reset().
    Colorf("@{kW}Hello world\n")

  color.Print("@rHello world")
}

Check the godoc result for more details.

About

Colorful terminal output for Golang

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Go 100.0%