initial
This commit is contained in:
commit
6a9de539ce
9 changed files with 277 additions and 0 deletions
25
cmd/main.go
Normal file
25
cmd/main.go
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"os"
|
||||
"os/signal"
|
||||
"parser-mandarake/config"
|
||||
"parser-mandarake/internal/app"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func main() {
|
||||
c := config.New()
|
||||
config.LogSetup(c.App.Mode, c.App.LogLvl)
|
||||
|
||||
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
||||
defer cancel()
|
||||
|
||||
appl := app.NewApp(c)
|
||||
|
||||
if err := appl.Run(ctx); err != nil {
|
||||
log.WithError(err).Fatal("Application run failed")
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue