OpenCollection calls OpenCollectionURL with the URL parsed from urlstr. OpenCollection is safe to call from multiple goroutines.
(ctx context.Context, urlstr string)
| 54 | // OpenCollection calls OpenCollectionURL with the URL parsed from urlstr. |
| 55 | // OpenCollection is safe to call from multiple goroutines. |
| 56 | func (mux *URLMux) OpenCollection(ctx context.Context, urlstr string) (*Collection, error) { |
| 57 | opener, u, err := mux.schemes.FromString("Collection", urlstr) |
| 58 | if err != nil { |
| 59 | return nil, err |
| 60 | } |
| 61 | return opener.(CollectionURLOpener).OpenCollectionURL(ctx, u) |
| 62 | } |
| 63 | |
| 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. |