s/getUrl/getURL

golang prefers URL not Url

Signed-off-by: Michael Kelly <mkelly@arista.com>
This commit is contained in:
Michael Kelly 2022-05-24 14:13:39 -07:00
parent 502a2d0d4a
commit 6c99a9b99d
No known key found for this signature in database
GPG key ID: 77F7FE93040ECF3E

View file

@ -177,7 +177,7 @@ func (cli *client) get(resource, name string, v interface{}) error {
return cli.getResource(cli.apiVersion, cli.namespace, resource, name, v) return cli.getResource(cli.apiVersion, cli.namespace, resource, name, v)
} }
func (cli *client) getUrl(url string, v interface{}) error { func (cli *client) getURL(url string, v interface{}) error {
resp, err := cli.client.Get(url) resp, err := cli.client.Get(url)
if err != nil { if err != nil {
return err return err
@ -190,14 +190,14 @@ func (cli *client) getUrl(url string, v interface{}) error {
} }
func (cli *client) getResource(apiVersion, namespace, resource, name string, v interface{}) error { func (cli *client) getResource(apiVersion, namespace, resource, name string, v interface{}) error {
return cli.getUrl(cli.urlFor(apiVersion, namespace, resource, name), v) return cli.getURL(cli.urlFor(apiVersion, namespace, resource, name), v)
} }
func (cli *client) listN(resource string, v interface{}, n int) error { func (cli *client) listN(resource string, v interface{}, n int) error {
params := url.Values{} params := url.Values{}
params.Add("limit", fmt.Sprintf("%d", n)) params.Add("limit", fmt.Sprintf("%d", n))
u := cli.urlForWithParams(cli.apiVersion, cli.namespace, resource, "", params) u := cli.urlForWithParams(cli.apiVersion, cli.namespace, resource, "", params)
return cli.getUrl(u, v) return cli.getURL(u, v)
} }
func (cli *client) list(resource string, v interface{}) error { func (cli *client) list(resource string, v interface{}) error {