code: func resourceURL(base *url.URL, relPath string) *url.URL {
  	relPath, rawQuery := splitPathQuery(relPath)
  	ref := &url.URL{Path: path.Join(base.Path, relPath), RawQuery: rawQuery}
  	return base.ResolveReference(ref)
  }
docs: // resourceURL returns a *url.URL with the path resolved for a resource under base.