blob: c9cf895b133bf4b07cc82b7798d2301e5ad8104b [file] [log] [blame]
Jon Perrittfd53bba2014-10-03 00:41:22 -05001package apiversions
2
3import (
4 "strings"
Marcin Krolik14c88012016-02-16 08:59:48 +01005 "net/url"
Jon Perrittfd53bba2014-10-03 00:41:22 -05006
Jon Perritt27249f42016-02-18 10:35:59 -06007 "github.com/gophercloud/gophercloud"
Jon Perrittfd53bba2014-10-03 00:41:22 -05008)
9
10func getURL(c *gophercloud.ServiceClient, version string) string {
11 return c.ServiceURL(strings.TrimRight(version, "/") + "/")
12}
13
14func listURL(c *gophercloud.ServiceClient) string {
Marcin Krolik14c88012016-02-16 08:59:48 +010015 u, _ := url.Parse(c.ServiceURL(""))
16 u.Path = "/"
17 return u.String()
Jon Perrittfd53bba2014-10-03 00:41:22 -050018}