Parse out numeric portion of semantic version.

This commit is contained in:
Erik McClenney 2017-09-11 17:19:08 -07:00
parent ba974dbbc7
commit c947339f27

View File

@ -303,7 +303,8 @@ func generateCloudConfig(configFile *ConfigFile) (cloudConfig *CloudConfig, err
// If no tokenSource is specified, uses oauth2.DefaultTokenSource.
// If managedZones is nil / empty all zones in the region will be managed.
func CreateGCECloud(config *CloudConfig) (*GCECloud, error) {
userAgent := fmt.Sprintf("(%s %s) Kubernetes/%s", runtime.GOOS, runtime.GOARCH, version.Get().GitVersion)
version := strings.Split(strings.Split(version.Get().GitVersion, "-")[0], "+")[0]
userAgent := fmt.Sprintf("(%s %s) Kubernetes/%s", runtime.GOOS, runtime.GOARCH, version)
client, err := newOauthClient(config.TokenSource)
if err != nil {