(ref string, rootPath *url.URL)
| 319 | } |
| 320 | |
| 321 | func (loader *Loader) resolvePathWithRef(ref string, rootPath *url.URL) (*url.URL, error) { |
| 322 | parsedURL, err := url.Parse(ref) |
| 323 | if err != nil { |
| 324 | return nil, fmt.Errorf("cannot parse reference: %q: %w", ref, err) |
| 325 | } |
| 326 | |
| 327 | resolvedPath := loader.resolvePath(rootPath, parsedURL) |
| 328 | resolvedPath.Fragment = parsedURL.Fragment |
| 329 | return resolvedPath, nil |
| 330 | } |
| 331 | |
| 332 | func (loader *Loader) resolveRefPath(ref string, path *url.URL) (*url.URL, error) { |
| 333 | if ref != "" && ref[0] == '#' { |
no test coverage detected