merch-api/internal/app/handler.go

30 lines
445 B
Go
Raw Normal View History

2026-02-23 18:34:38 +03:00
package app
import (
"context"
log "github.com/sirupsen/logrus"
"merch-api/config"
)
type App struct {
cfg config.Config
}
func New(cfg config.Config) *App {
return &App{cfg: cfg}
}
func (app *App) Run(ctx context.Context) error {
log.Info("Starting application...")
select {
case <-ctx.Done():
app.Shutdown(ctx)
}
return nil
}
func (app *App) Shutdown(ctx context.Context) {
log.Info("Shutting down application...")
return
}