codeword/template/internal/app/app.go.tmpl
2023-12-29 14:30:20 +03:00

20 lines
320 B
Cheetah

package app
import (
"context"
{{.Modules.logger.Import}}
)
{{.Modules.env.Struct}}
func Run(ctx context.Context, config Config, logger {{.Modules.logger.Type}}) error {
{{.Modules.logger.Message "info" "App started" "config" "config"}}
<-ctx.Done()
logger.Info("App shutting down gracefully")
return nil
}