terminal.IsTerminal() is not available on FreeBSD until go1.3

This commit is contained in:
Andrey Smirnov
2014-02-10 22:48:12 +04:00
parent 1bba0319cb
commit 766d634fbb
3 changed files with 20 additions and 3 deletions
+12
View File
@@ -0,0 +1,12 @@
// +build !freebsd
package utils
import (
"code.google.com/p/go.crypto/ssh/terminal"
"syscall"
)
func RunningOnTerminal() bool {
return terminal.IsTerminal(syscall.Stdout)
}