Peter Kurfer
9ea9a8f658
Some checks failed
Go build / build (push) Failing after 1m58s
- setup ent scheme - add command to create users - document API - add helpers to create migrations - add command to run migrations - add basic compose file
15 lines
325 B
Go
15 lines
325 B
Go
package dbtest
|
|
|
|
import "context"
|
|
|
|
type DbCloser interface {
|
|
Close(ctx context.Context) error
|
|
}
|
|
|
|
type NoOpCloser func(context.Context) error
|
|
|
|
func (NoOpCloser) Close(context.Context) error { return nil }
|
|
|
|
type CloserFunc func(ctx context.Context) error
|
|
|
|
func (f CloserFunc) Close(ctx context.Context) error { return f(ctx) }
|