refactor: push commands in to cmd and ev to root as library

This commit is contained in:
Jon Lundy
2023-01-09 11:30:02 -07:00
parent 250395d6b3
commit 4fc9c78dae
58 changed files with 765 additions and 376 deletions

View File

@@ -9,7 +9,7 @@ import (
"go.uber.org/multierr"
)
func Init(ctx context.Context, name string) (context.Context, func() error) {
func Init(ctx context.Context, name string) (context.Context, func(context.Context) error) {
ctx, span := Span(ctx)
defer span.End()
@@ -21,7 +21,7 @@ func Init(ctx context.Context, name string) (context.Context, func() error) {
reverse(stop[:])
return ctx, func() error {
return ctx, func(context.Context) error {
log.Println("flushing logs...")
errs := make([]error, len(stop))
for i, fn := range stop {