client: don't do version discovery when version="" #27

Merged
merged 1 commit into from Oct 26, 2016

Conversation

Projects
None yet
3 participants
Member

axw commented Oct 26, 2016

If the user specifies no API version at all, don't
perform version discovery, and just return the URL
reported by the authentication response. This is to
support Juju's use of the "product-streams" service
entry for simplestreams data.

client/client.go
- serviceURL, err = getAPIVersionURL(apiURLVersionInfo, requestedVersion)
- if err != nil {
- return "", err
+ if apiVersion != "" {
@wallyworld

wallyworld Oct 26, 2016

Owner

maybe invert this to avoid the indented block
if apiVersion == "" {
return blah
}
// do version stuff
...

@axw

axw Oct 26, 2016

Member

Done.

client: don't do version discovery when version=""
If the user specifies no API version at all, don't
perform version discovery, and just return the URL
reported by the authentication response. This is to
support Juju's use of the "product-streams" service
entry for simplestreams data.
Member

axw commented Oct 26, 2016

$$merge$$

Member

jujubot commented Oct 26, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-goose

@jujubot jujubot merged commit 807a92a into go-goose:v1 Oct 26, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment