(closer io.Closer, err *error)
| 137 | } |
| 138 | |
| 139 | func safeClose(closer io.Closer, err *error) { |
| 140 | if closeErr := closer.Close(); *err == nil { |
| 141 | *err = closeErr |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | // hasTTY indicates whether the process connected to a terminal. |
| 146 | // It is not portable to assume stdin/stdout are fds 0 and 1. |
no test coverage detected