feat(01-02): dispatch typed events with request context

- App-owned festival bus with Fire, Collect and UntilHandled
- Recover listener panics with owner plugin IDs; isolate buses per app
- towel context accessors and hello command demo of all three modes
This commit is contained in:
Jakub Zych
2026-09-16 13:30:46 +02:00
parent 36c152f4bb
commit a654e96d66
5 changed files with 272 additions and 13 deletions

View File

@@ -2,8 +2,6 @@ package towel
import (
"context"
"go/parser"
"go/token"
"os"
"strings"
"testing"
@@ -40,21 +38,11 @@ func TestNoPackageGlobalRequestState(t *testing.T) {
if err != nil {
t.Fatal(err)
}
fset := token.NewFileSet()
for _, entry := range entries {
name := entry.Name()
if entry.IsDir() || !strings.HasSuffix(name, ".go") || strings.HasSuffix(name, "_test.go") {
continue
}
file, err := parser.ParseFile(fset, name, nil, parser.SkipObjectResolution)
if err != nil {
t.Fatal(err)
}
for _, spec := range file.Decls {
gen, ok := spec.(interface{ TokString() string })
_ = gen
_ = ok
}
src, err := os.ReadFile(name)
if err != nil {
t.Fatal(err)