module test
This commit is contained in:
parent
f8d21804a8
commit
2890aed889
3
cmd/server/go.mod
Normal file
3
cmd/server/go.mod
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
module git.mzsl.nl/mans/goshare/cmd/goshare-server
|
||||||
|
|
||||||
|
go 1.21.6
|
@ -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)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user