(ctx context.Context, tb TB, fn func(t TB, db *pgx.Conn))
| 69 | } |
| 70 | |
| 71 | func WithDatabase[TB testing.TB](ctx context.Context, tb TB, fn func(t TB, db *pgx.Conn)) { |
| 72 | if *pgaddr == "" { |
| 73 | tb.Skip("-database flag not defined") |
| 74 | } |
| 75 | withDatabase(ctx, *pgaddr, tb, fn) |
| 76 | } |
| 77 | |
| 78 | func withDatabase[TB testing.TB](ctx context.Context, connstr string, tb TB, fn func(t TB, db *pgx.Conn)) { |
| 79 | if connstr == "" { |
nothing calls this directly
no test coverage detected