This repository was archived by the owner on Jan 30, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fleetctl: take experimentalAPI into account in getClient
getClient() has not taken into account the case of !experimentalAPI, before calling registryClient. It has set endPoint to a specific value of URLs, but the new value would not be passed to getRegistryClient(), which simply fetches endPoint again. This was a regression since 848d356 ("fleetctl: convert cli to cobra"). To fix that, introduce getEndpoint() that does GetString("endpoint") as well as the special handling for experimentalAPI. And make getRegistryClient() call getEndpoint(). Fortunately, the experimentalAPI flag is set to true by default, so this special handling path is not actively used after all. Just for correctness.
- Loading branch information