mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-27 22:49:40 -08:00
59de58d380
* Docker Swarm service discovery Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
12 lines
224 B
Go
12 lines
224 B
Go
package logrus
|
|
|
|
import (
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
|
|
// IsTerminal returns true if the given file descriptor is a terminal.
|
|
func isTerminal(fd int) bool {
|
|
_, err := unix.IoctlGetTermio(fd, unix.TCGETA)
|
|
return err == nil
|
|
}
|