MCPcopy Create free account
hub / github.com/astercloud/aster / isTerminal

Function isTerminal

cmd/aster/session.go:490–499  ·  view source on GitHub ↗

isTerminal checks if the writer is a terminal

(w io.Writer)

Source from the content-addressed store, hash-verified

488
489// isTerminal checks if the writer is a terminal
490func isTerminal(w io.Writer) bool {
491 if f, ok := w.(*os.File); ok {
492 stat, err := f.Stat()
493 if err != nil {
494 return false
495 }
496 return (stat.Mode() & os.ModeCharDevice) != 0
497 }
498 return false
499}

Callers 1

runSessionFunction · 0.85

Calls 1

StatMethod · 0.65

Tested by

no test coverage detected