func (c Config) BasePath() (charmhubpath.Path, error) {
	baseURL := strings.TrimRight(c.URL, "/")
	rawURL := fmt.Sprintf("%s/%s", baseURL, path.Join(c.Version, c.Entity))
	url, err := url.Parse(rawURL)
	if err != nil {
		return charmhubpath.Path{}, errors.Trace(err)
	}
	return charmhubpath.MakePath(url), nil
}
// BasePath returns the base configuration path for speaking to the server API.
BasePath returns the base configuration path for speaking to the server API.
// BasePath returns the base configuration path for speaking to the server API .
func (c Config) BasePath() (charmhubpath.Path, error) {
	baseURL := strings.TrimRight(c.URL, "/")
	rawURL := fmt.Sprintf("%s/%s", baseURL, path.Join(c.Version, c.Entity))
	url, err := url.Parse(rawURL)
	if err != nil {
		return charmhubpath.Path{}, errors.Trace(err)
	}
	return charmhubpath.MakePath(url), nil
}
func ( c Config ) BasePath ( ) ( charmhubpath . Path , error ) { baseURL := strings . TrimRight ( c . URL , " " ) rawURL := fmt . Sprintf ( " " , baseURL , path . Join ( c . Version , c . Entity ) ) url , err := url . Parse ( rawURL ) if err != nil { return charmhubpath . Path { } , errors . Trace ( err ) } return charmhubpath . MakePath ( url ) , nil }
BasePath returns the base configuration path for speaking to the server API.
BasePath returns the base configuration path for speaking to the server API .