enable gitea actions

This commit is contained in:
Aleksandr Trushkin
2024-02-02 18:24:00 +03:00
parent 4ceeba1608
commit d18d1d44dd
9 changed files with 124 additions and 44 deletions

View File

@ -2,8 +2,10 @@ package components
import (
"context"
"errors"
"fmt"
"io"
"os"
"time"
"git.loyso.art/frx/eway/internal/config"
@ -40,6 +42,11 @@ func GetLogger() (zerolog.Logger, error) {
func SetupDI(ctx context.Context, cfgpath string) error {
cfg, err := parseSettings(cfgpath)
if err != nil {
// if no settings provided allow cli to run without them.
if errors.Is(err, os.ErrNotExist) {
return nil
}
return err
}
@ -98,6 +105,10 @@ func SetupDI(ctx context.Context, cfgpath string) error {
}
func Shutdown() error {
if diInjector == nil {
return nil
}
return diInjector.Shutdown()
}