stdio.go 396 B

123456789101112131415161718192021222324
  1. package terminal
  2. import (
  3. "io"
  4. )
  5. // Stdio is the standard input/output the terminal reads/writes with.
  6. type Stdio struct {
  7. In FileReader
  8. Out FileWriter
  9. Err io.Writer
  10. }
  11. // FileWriter provides a minimal interface for Stdin.
  12. type FileWriter interface {
  13. io.Writer
  14. Fd() uintptr
  15. }
  16. // FileReader provides a minimal interface for Stdout.
  17. type FileReader interface {
  18. io.Reader
  19. Fd() uintptr
  20. }