31 lines
450 B
Go
31 lines
450 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"os/signal"
|
|
"sync"
|
|
"syscall"
|
|
|
|
"marketlab/application"
|
|
|
|
"go.uber.org/zap"
|
|
)
|
|
|
|
func main() {
|
|
ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
|
|
defer cancel()
|
|
|
|
app, err := application.NewApplication(ctx)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
wg := &sync.WaitGroup{}
|
|
if err := app.Start(ctx, wg); err != nil {
|
|
app.Logger.Fatal("startup", zap.Error(err))
|
|
}
|
|
|
|
wg.Wait()
|
|
|
|
}
|