weaveworks / launcher

Weave Cloud Launcher
Apache License 2.0
10 stars 13 forks source link

kubectl: Simplify parseOutputVersion #163

Closed dlespiau closed 6 years ago

dlespiau commented 6 years ago

We were using struct to store client and server versions, but this was from the time where we decoded some JSON output and used those structs to unmarshal into.

Lili pointed out we can do things in a nicer way now that we don't parse JSON, removing the usage of those structs entirely.

Still need to be a bit careful with the error management, in particular kubectl version could return the client version but not the server version because it couldn't contact the API servers.

dlespiau commented 6 years ago

Not sure why the lint job is still in the list of expected checks, it really doesn't exit anymore.

dlespiau commented 6 years ago

Thanks for the review!