Fixed compilation for Solaris
There are missing "io" import and unused variable Releated issues #471 #289
This commit is contained in:
+1
-1
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user