dont fail on err but log all
parent
0afb6535b6
commit
4fbc96b96f
|
|
@ -48,11 +48,17 @@ func Main(ctx context.Context, args []string) error {
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
case BestAssToSRT:
|
case BestAssToSRT:
|
||||||
|
errs := []string{}
|
||||||
for _, pos := range flags.Pos {
|
for _, pos := range flags.Pos {
|
||||||
if err := inass.BestAssToSRT(ctx, pos); err != nil {
|
if err := inass.BestAssToSRT(ctx, pos); err != nil {
|
||||||
return err
|
err = fmt.Errorf("[%s] %w", pos, err)
|
||||||
|
log.Println(err)
|
||||||
|
errs = append(errs, err.Error())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if len(errs) > 0 {
|
||||||
|
return fmt.Errorf("errors: %+v", errs)
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
default:
|
default:
|
||||||
panic(flags.Entrypoint.String())
|
panic(flags.Entrypoint.String())
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue