OpenPostgresURL dispatches the URL to the opener that is registered with the URL's scheme. OpenPostgresURL is safe to call from multiple goroutines.
(ctx context.Context, u *url.URL)
| 99 | // OpenPostgresURL dispatches the URL to the opener that is registered with the |
| 100 | // URL's scheme. OpenPostgresURL is safe to call from multiple goroutines. |
| 101 | func (mux *URLMux) OpenPostgresURL(ctx context.Context, u *url.URL) (*sql.DB, error) { |
| 102 | opener, err := mux.schemes.FromURL("DB", u) |
| 103 | if err != nil { |
| 104 | return nil, err |
| 105 | } |
| 106 | return opener.(PostgresURLOpener).OpenPostgresURL(ctx, u) |
| 107 | } |
| 108 | |
| 109 | var defaultURLMux = new(URLMux) |
| 110 |
nothing calls this directly
no test coverage detected