2024-01-23 19:13:51 +00:00
|
|
|
package main
|
|
|
|
|
2024-01-23 19:37:51 +00:00
|
|
|
import (
|
|
|
|
"context"
|
2024-01-23 21:18:51 +00:00
|
|
|
"log"
|
2024-01-23 19:37:51 +00:00
|
|
|
"os"
|
|
|
|
"os/signal"
|
|
|
|
|
|
|
|
"git.mzsl.nl/mans/goshare/app"
|
|
|
|
)
|
2024-01-23 19:13:51 +00:00
|
|
|
|
|
|
|
func main() {
|
2024-01-23 19:37:51 +00:00
|
|
|
app := app.New()
|
2024-01-23 21:18:51 +00:00
|
|
|
|
2024-01-23 19:37:51 +00:00
|
|
|
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt)
|
2024-01-23 21:18:51 +00:00
|
|
|
|
2024-01-23 19:37:51 +00:00
|
|
|
defer cancel()
|
|
|
|
|
2024-01-23 21:18:51 +00:00
|
|
|
err := app.Start(ctx)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
log.Fatalf("failed to start app: %s", err)
|
|
|
|
}
|
2024-01-23 19:13:51 +00:00
|
|
|
}
|