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