buildEscapedPath escapes and joins path elements for a URL flake ref. The resulting path is cleaned according to url.JoinPath.
(elem ...string)
| 542 | // buildEscapedPath escapes and joins path elements for a URL flake ref. The |
| 543 | // resulting path is cleaned according to url.JoinPath. |
| 544 | func buildEscapedPath(elem ...string) string { |
| 545 | for i := range elem { |
| 546 | elem[i] = url.PathEscape(elem[i]) |
| 547 | } |
| 548 | u := &url.URL{} |
| 549 | return u.JoinPath(elem...).String() |
| 550 | } |
| 551 | |
| 552 | // appendQueryString builds a URL query string from a list of key-value string |
| 553 | // pairs, omitting any keys with empty values. |