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

Method OpenCollectionURL

docstore/urls.go:66–72  ·  view source on GitHub ↗

OpenCollectionURL dispatches the URL to the opener that is registered with the URL's scheme. OpenCollectionURL is safe to call from multiple goroutines.

(ctx context.Context, u *url.URL)

Source from the content-addressed store, hash-verified

64// OpenCollectionURL dispatches the URL to the opener that is registered with
65// the URL's scheme. OpenCollectionURL is safe to call from multiple goroutines.
66func (mux *URLMux) OpenCollectionURL(ctx context.Context, u *url.URL) (*Collection, error) {
67 opener, err := mux.schemes.FromURL("Collection", u)
68 if err != nil {
69 return nil, err
70 }
71 return opener.(CollectionURLOpener).OpenCollectionURL(ctx, u)
72}
73
74var defaultURLMux = new(URLMux)
75

Callers

nothing calls this directly

Calls 2

FromURLMethod · 0.80
OpenCollectionURLMethod · 0.65

Tested by

no test coverage detected