MutableSafeURL is a REST API URL built from a host prefix, path components, and query parameters. The path components and query parameters are URL encoded (aka percent-encoded) when the URL is rendered so that caller supplied values cannot alter the structure of the URL or change which resource it a
| 43 | // alter the structure of the URL or change which resource it addresses; the host |
| 44 | // prefix is used as given. The zero value renders as the empty string. |
| 45 | type MutableSafeURL struct { |
| 46 | prefix string |
| 47 | components []string |
| 48 | query url.Values |
| 49 | } |
| 50 | |
| 51 | // JoinPath returns a SafeURL for the path made up of the given components. It |
| 52 | // returns an error if any component is exactly "..", which would traverse the URL |
nothing calls this directly
no outgoing calls
no test coverage detected