blob: d46556509e275d820fd7d3665171c2a849a7a9e9 [file] [log] [blame]
khenaidooac637102019-01-14 15:44:34 -05001// +build !appengine,!js,!windows,!aix
2
3package logrus
4
5import (
6 "io"
7 "os"
8
9 "golang.org/x/crypto/ssh/terminal"
10)
11
12func checkIfTerminal(w io.Writer) bool {
13 switch v := w.(type) {
14 case *os.File:
15 return terminal.IsTerminal(int(v.Fd()))
16 default:
17 return false
18 }
19}