[Mirror] Go bindings for libghostty-vt. Source of truth: https://tangled.org/mitchellh.com/go-libghostty
by mitchellhGo
2 of 6 standards met
Add human-friendly string conversion to the input enum types so they can be serialized to and parsed from text formats like JSON or configuration files. Each type gains a String() method returning the canonical snake_case name (e.g. "key_a", "arrow_down", "shift+ctrl", "middle", "gained") and a pointer-receiver FromString method that mutates the receiver. A top-level NewKeyFromString, NewModsFromString, NewMouseButtonFromString, and NewFocusEventFromString constructor is also provided as a more ergonomic alternative.
Fixes #6 The root libghostty package previously imported image/png for SysDecodePng. Because image/png registers itself via an init() function, the Go linker cannot eliminate it from binaries that never call SysDecodePng. Every consumer paid the cost. Move the built-in PNG decoder into sys/png so users opt in explicitly. The root package no longer imports image or image/png. The kitty_graphics_test.go file inlines a local test helper to avoid the import cycle that would result from an internal test package importing its own subpackage.
Repository: mitchellh/go-libghostty. Description: [Mirror] Go bindings for libghostty-vt. Source of truth: https://tangled.org/mitchellh.com/go-libghostty Stars: 139, Forks: 7. Primary language: Go. License: MIT. Homepage: https://pkg.go.dev/go.mitchellh.com/libghostty Topics: ghostty, libghostty. Open PRs: 0, open issues: 1. Last activity: 1mo ago. Community health: 42%. Top contributors: mitchellh, pearkes.