Skip to content

azer/is-terminal

Repository files navigation

is-terminal

Returns true or false depending on if the os.Stdout is associated with a terminal.

Extracted from Sirupsen/logrus

Install

$ go get github.com/azer/is-terminal

Usage

package main

import (
  "github.com/azer/is-terminal"
  "syscall"
  "fmt"
)

func () {
  fmt.Println(isterminal.IsTerminal(syscall.Stdout))
  // => true or false
}

About

Returns true or false depending on if the stdout is associated with a terminal.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages