Skip to content

adapters/tty

import "go-cli-template/internal/adapters/tty"

Index

func GetProgramOptions

func GetProgramOptions(baseOpts ...tea.ProgramOption) []tea.ProgramOption

GetProgramOptions 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) bool

IsTerminal checks if the file descriptor is a terminal

Source

See internal/adapters/tty/ for implementation details.