github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/blockstorage/v1/apiversions/urls.go (about)

     1  package apiversions
     2  
     3  import (
     4  	"net/url"
     5  	"strings"
     6  
     7  	"github.com/huaweicloud/golangsdk"
     8  )
     9  
    10  func getURL(c *golangsdk.ServiceClient, version string) string {
    11  	return c.ServiceURL(strings.TrimRight(version, "/") + "/")
    12  }
    13  
    14  func listURL(c *golangsdk.ServiceClient) string {
    15  	u, _ := url.Parse(c.ServiceURL(""))
    16  	u.Path = "/"
    17  	return u.String()
    18  }