@@ -3,23 +3,14 @@ package main
33import (
44 "log/slog"
55 "net/http"
6+ _ "net/http/pprof"
67 "os"
78
8− _ "net/http/pprof" // profiling
9−
10− _ "github.com/joho/godotenv/autoload" // automatically load .env files
11−
129 "github.com/charmbracelet/crush/internal/cmd"
13− "github.com/charmbracelet/crush/internal/event"
14− "github.com/charmbracelet/crush/internal/log"
10+ _ "github.com/joho/godotenv/autoload"
1511)
1612
1713func main() {
18− defer log.RecoverPanic("main", func() {
19− event.Flush()
20− slog.Error("Application terminated due to unhandled panic")
21− })
22−
2314 if os.Getenv("CRUSH_PROFILE") != "" {
2415 go func() {
2516 slog.Info("Serving pprof at localhost:6060")