forked from mystiq/dex
Tweaks based on review comments
Signed-off-by: Michael Kelly <mkelly@arista.com>
This commit is contained in:
parent
6c99a9b99d
commit
a51d12056f
2 changed files with 9 additions and 9 deletions
|
@ -96,18 +96,18 @@ func (cli *client) urlForWithParams(
|
||||||
} else {
|
} else {
|
||||||
p = path.Join(basePath, apiVersion, resource, name)
|
p = path.Join(basePath, apiVersion, resource, name)
|
||||||
}
|
}
|
||||||
if strings.HasSuffix(cli.baseURL, "/") {
|
|
||||||
return cli.baseURL + p
|
|
||||||
}
|
|
||||||
|
|
||||||
r := cli.baseURL + "/" + p
|
|
||||||
|
|
||||||
encodedParams := params.Encode()
|
encodedParams := params.Encode()
|
||||||
|
paramsSuffix := ""
|
||||||
if len(encodedParams) > 0 {
|
if len(encodedParams) > 0 {
|
||||||
return r + "?" + encodedParams
|
paramsSuffix = "?" + encodedParams
|
||||||
}
|
}
|
||||||
|
|
||||||
return r
|
if strings.HasSuffix(cli.baseURL, "/") {
|
||||||
|
return cli.baseURL + p + paramsSuffix
|
||||||
|
}
|
||||||
|
|
||||||
|
return cli.baseURL + "/" + p + paramsSuffix
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cli *client) urlFor(apiVersion, namespace, resource, name string) string {
|
func (cli *client) urlFor(apiVersion, namespace, resource, name string) string {
|
||||||
|
@ -201,7 +201,7 @@ func (cli *client) listN(resource string, v interface{}, n int) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cli *client) list(resource string, v interface{}) error {
|
func (cli *client) list(resource string, v interface{}) error {
|
||||||
return cli.listN(resource, v, -1)
|
return cli.get(resource, "", v)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cli *client) post(resource string, v interface{}) error {
|
func (cli *client) post(resource string, v interface{}) error {
|
||||||
|
|
|
@ -41,7 +41,7 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
gcResultLimit = 10000
|
gcResultLimit = 500
|
||||||
)
|
)
|
||||||
|
|
||||||
// Config values for the Kubernetes storage type.
|
// Config values for the Kubernetes storage type.
|
||||||
|
|
Loading…
Reference in a new issue