Package httputil holds utility functions related to net/http.
func RelativeURLPath ¶
RelativeURLPath returns a relative URL path that is lexically equivalent to targpath when interpreted by url.URL.ResolveReference. On success, the returned path will always be non-empty and relative to basePath, even if basePath and targPath share no elements.
It is assumed that both basePath and targPath are normalized (have no . or .. elements).
An error is returned if basePath or targPath are not absolute paths.