commit 5b13bd25450f74dc78c21f23a5b1751c89477aaa Author: bel Date: Sun Mar 22 19:31:59 2026 -0600 initial diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..fe19b02 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module gitea/town-ana + +go 1.22.2 diff --git a/main.go b/main.go new file mode 100644 index 0000000..dcec5d8 --- /dev/null +++ b/main.go @@ -0,0 +1,19 @@ +package main + +import ( + "context" + "os/signal" + "syscall" +) + +func main() { + ctx, can := signal.NotifyContext(context.Background(), syscall.SIGINT) + defer can() + if err := run(ctx); err != nil && ctx.Err() == nil { + panic(err) + } +} + +func run(ctx context.Context) error { + return ctx.Err() +}