(baseHost string, path string)
| 376 | } |
| 377 | |
| 378 | func urlJoinPathAbsolute(baseHost string, path string) (result string, err error) { |
| 379 | if strings.HasPrefix("/", path) { |
| 380 | // absolute path |
| 381 | baseHostURL, err := url.ParseRequestURI(baseHost) |
| 382 | if err != nil { |
| 383 | return "", err |
| 384 | } |
| 385 | |
| 386 | baseHostURL.Path = path |
| 387 | |
| 388 | return baseHostURL.String(), nil |
| 389 | } |
| 390 | |
| 391 | // relative path |
| 392 | return url.JoinPath(baseHost, path) |
| 393 | } |
no test coverage detected
searching dependent graphs…