forked from mirror/logrus
Fixed compilation for Solaris
There are missing "io" import and unused variable Releated issues #471 #289
This commit is contained in:
parent
7f4b1adc79
commit
f9d4a063d1
|
@ -3,6 +3,7 @@
|
||||||
package logrus
|
package logrus
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"io"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
|
@ -10,7 +11,6 @@ import (
|
||||||
|
|
||||||
// IsTerminal returns true if the given file descriptor is a terminal.
|
// IsTerminal returns true if the given file descriptor is a terminal.
|
||||||
func IsTerminal(f io.Writer) bool {
|
func IsTerminal(f io.Writer) bool {
|
||||||
var termios Termios
|
|
||||||
switch v := f.(type) {
|
switch v := f.(type) {
|
||||||
case *os.File:
|
case *os.File:
|
||||||
_, err := unix.IoctlGetTermios(int(v.Fd()), unix.TCGETA)
|
_, err := unix.IoctlGetTermios(int(v.Fd()), unix.TCGETA)
|
||||||
|
|
Loading…
Reference in New Issue