feat: redesign server startup around Run options

Replace the old RunShutdown and RunTLS style entry points with a single Run(opts...) API for v1. Add focused startup semantics tests, keep TLS and graceful shutdown independent, ensure sibling servers are cleaned up on startup failure, and update docs to match the new option-based startup model.
This commit is contained in:
wjqserver 2026-04-07 17:44:55 +08:00
parent fca9bbd3ef
commit e4d3eed379
13 changed files with 577 additions and 335 deletions

View file

@ -142,7 +142,7 @@ func main() {
r := touka.Default()
fsroot, _ := fs.Sub(content, "dist")
r.StaticFS("/", http.FS(fsroot))
r.Run(":8080")
r.Run(touka.WithAddr(":8080"))
}
```