adapters/tty
import "go-cli-template/internal/adapters/tty"Index
- func GetProgramOptions(baseOpts …tea.ProgramOption) []tea.ProgramOption
- func IsTerminal(fd uintptr) bool
func GetProgramOptions
func GetProgramOptions(baseOpts ...tea.ProgramOption) []tea.ProgramOptionGetProgramOptions returns Bubble Tea program options with TTY redirection when stdout is not a TTY (e.g., captured by command substitution). This allows the TUI to display properly while keeping stdout for result output.
func IsTerminal
func IsTerminal(fd uintptr) boolIsTerminal checks if the file descriptor is a terminal
Source
See internal/adapters/tty/ for implementation details.