Documentation
¶
Overview ¶
Package platform reports host-platform facts the TUI adapts its presentation to. It is stdlib-only and lives under cmd/mecatui/ui so the ui package can import it without crossing the client/theme-only import boundary.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ScrollKeysMarking ¶
func ScrollKeysMarking() string
ScrollKeysMarking returns the user-facing label for the page-up/page-down scroll chords, adapted to the current platform. Mac prepends the physical gesture (fn+↑/fn+↓) while keeping the canonical name in parens, so a user who has remapped their terminal still recognises it. Single source of truth — every site that renders a "pgup/pgdn scroll" hint reads this instead of hardcoding the literal.
Types ¶
type Platform ¶
type Platform int
Platform is the host platform the TUI adapts its presentation to.
func Current ¶
func Current() Platform
Current returns the resolved platform. In tests, the MECATUI_TEST_PLATFORM env var (values "pc" or "mac") pins it so golden output stays host-independent — a Mac dev box and Linux CI must agree. Without the override it is detected from the runtime. The env var is read at call time (not init) so a TestMain that sets it takes effect, mirroring the MECATUI_NO_EMOJI precedent.