SIGN IN SIGN UP
tw93 / Mole UNCLAIMED

🐹 Deep clean and optimize your Mac.

0 0 84 Shell

refactor(analyze): split main.go into bootstrap, model, update

cmd/analyze/main.go grew to 1296 lines mixing flag parsing, the model
struct, message types, and the Bubble Tea Update chain. New key bindings
or message handlers had to wade through unrelated code.

Split into three files by clear ownership:
  main.go    bootstrap only (flag parsing, main, helpers; ~210 lines)
  model.go   types and model struct with small accessor methods (~250)
  update.go  Bubble Tea Update chain and message handlers (~850)

scanner.go gets a 5-field godoc on scanLimiter explaining why duSem and
duQueueSem stay separate (merging causes either memory growth or du
concurrency overload).

No behavior change. go test ./cmd/analyze covers the model + Update flow.
T
Tw93 committed
3e5a16437502f9ea37805a5343f7b12951bba2be
Parent: e4dc747