supabase-operator/internal/errx/closing.go
Peter Kurfer 7d9e518f86
Some checks failed
Lint / Run on Ubuntu (push) Failing after 2m42s
E2E Tests / Run on Ubuntu (push) Failing after 3m44s
Tests / Run on Ubuntu (push) Failing after 3m53s
refactor(db): extract Supabase migrations from release artifact
2025-01-05 11:42:15 +01:00

18 lines
299 B
Go

package errx
import (
"context"
"errors"
"io"
)
func Close(closer io.Closer, err *error) {
*err = errors.Join(*err, closer.Close())
}
func CloseCtx(ctx context.Context, closable interface {
Close(ctx context.Context) error
}, err *error,
) {
*err = errors.Join(*err, closable.Close(ctx))
}