You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

26 line
442 B

  1. package main
  2. import (
  3. "context"
  4. "log"
  5. "os/signal"
  6. "syscall"
  7. "github.com/AFASystems/presence/internal/app/decoder"
  8. "github.com/AFASystems/presence/internal/pkg/config"
  9. )
  10. func main() {
  11. ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGTERM, syscall.SIGINT)
  12. defer stop()
  13. cfg := config.LoadDecoder()
  14. app, err := decoder.New(cfg)
  15. if err != nil {
  16. log.Fatalf("decoder: %v", err)
  17. }
  18. app.Run(ctx)
  19. app.Shutdown()
  20. }