readme: update with example of logging to file
This commit is contained in:
+1
-1
@@ -13,7 +13,7 @@ func IsTerminal(f io.Writer) bool {
|
||||
var termios Termios
|
||||
switch v := f.(type) {
|
||||
case *os.File:
|
||||
_, err := unix.IoctlGetTermios(int(f.Fd()), unix.TCGETA)
|
||||
_, err := unix.IoctlGetTermios(int(v.Fd()), unix.TCGETA)
|
||||
return err == nil
|
||||
default:
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user