server with basic hot reload

This commit is contained in:
2025-11-30 10:09:53 +02:00
parent f1ed3c977a
commit 44e92bcfef
14 changed files with 700 additions and 18 deletions

16
internal/safe/recover.go Normal file
View File

@@ -0,0 +1,16 @@
package safe
import (
"fmt"
)
func SafeGO(fn func(), errs chan<- error) {
go func() {
defer func() {
if r := recover(); r != nil {
errs <- fmt.Errorf("panic: %v", r)
}
}()
fn()
}()
}