enable gitea actions
This commit is contained in:
@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user