MCPcopy Create free account
hub / github.com/google/go-cloud / OpenPostgresURL

Method OpenPostgresURL

postgres/postgres.go:101–107  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
101func (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
109var defaultURLMux = new(URLMux)
110

Callers

nothing calls this directly

Calls 2

FromURLMethod · 0.80
OpenPostgresURLMethod · 0.65

Tested by

no test coverage detected