MCPcopy
hub / github.com/github/git-sizer / Isatty

Function Isatty

isatty/isatty_enabled.go:17–23  ·  view source on GitHub ↗

Isatty tries to determine whether `fd` is a TTY.

(fd uintptr)

Source from the content-addressed store, hash-verified

15
16// Isatty tries to determine whether `fd` is a TTY.
17func Isatty(fd uintptr) (bool, error) {
18 result, err := C.isatty(C.int(fd))
19 if err != nil && err != syscall.EINVAL {
20 return false, err
21 }
22 return result != 0, nil
23}

Callers 1

mainImplementationFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected