outIsTTY reports whether the provided writer is a *os.File backed by a terminal. Tests pass *bytes.Buffer, which returns false; the live CLI passes os.Stdout, which returns true on an interactive console.
(out io.Writer)
| 164 | // a terminal. Tests pass *bytes.Buffer, which returns false; the live |
| 165 | // CLI passes os.Stdout, which returns true on an interactive console. |
| 166 | func outIsTTY(out io.Writer) bool { |
| 167 | file, ok := out.(*os.File) |
| 168 | if !ok { |
| 169 | return false |
| 170 | } |
| 171 | return isTerminal(file) |
| 172 | } |
| 173 | |
| 174 | // cacheTTLFromCommon reads provider metadata cache_ttl_seconds from the store-backed file shape. |
| 175 | // Default: 24h. |
no test coverage detected