module test

This commit is contained in:
Mans Ziesel 2024-01-23 22:18:51 +01:00
parent f8d21804a8
commit 2890aed889
2 changed files with 11 additions and 1 deletions

3
cmd/server/go.mod Normal file
View File

@ -0,0 +1,3 @@
module git.mzsl.nl/mans/goshare/cmd/goshare-server
go 1.21.6

View File

@ -2,7 +2,7 @@ package main
import ( import (
"context" "context"
"fmt" "log"
"os" "os"
"os/signal" "os/signal"
@ -11,7 +11,14 @@ import (
func main() { func main() {
app := app.New() app := app.New()
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt) ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt)
defer cancel() defer cancel()
err := app.Start(ctx)
if err != nil {
log.Fatalf("failed to start app: %s", err)
}
} }