// +build solaris,!appenginepackagelogrusimport("io""os""golang.org/x/sys/unix")// IsTerminal returns true if the given file descriptor is a terminal.funcIsTerminal(fio.Writer)bool{switchv:=f.(type){case*os.File:_,err:=unix.IoctlGetTermios(int(v.Fd()),unix.TCGETA)returnerr==nildefault:returnfalse}}