mirror of
https://github.com/jixishi/SerialTerminalForWindowsTerminal.git
synced 2026-06-16 00:52:44 +00:00
refactor: split termapp into proper internal packages
Replace monolithic internal/termapp with proper separation: - internal/app: App struct, lifecycle, output loops - internal/command: CommandHost interface, Dispatcher, handlers - internal/tui: Model, hotkeys, panels, render (with panelError + border fixes) - internal/console: RunConsole, escape parsing, entry point logic - cmd/serialterminal: thin main() calling console.Run() Eliminate global vars (cfg, sess, out) via dependency injection. Break App->CommandDispatcher cycle via CommandHost interface. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -45,6 +45,10 @@ func Init(cfg *config.Config) {
|
||||
_ = pflag.Lookup("time") // mark for NoOptDefVal
|
||||
}
|
||||
|
||||
// Normalize converts single-dash long flags (e.g. -port) to double-dash (--port).
|
||||
// Parse wraps pflag.Parse.
|
||||
func Parse() { pflag.Parse() }
|
||||
|
||||
// Normalize converts single-dash long flags (e.g. -port) to double-dash (--port).
|
||||
func Normalize() {
|
||||
known := map[string]bool{
|
||||
|
||||
Reference in New Issue
Block a user