You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by ra...@apache.org on 2018/06/20 14:54:11 UTC

[incubator-openwhisk-cli] branch master updated: add OS and CPU architecture to user agent header (#344)

This is an automated email from the ASF dual-hosted git repository.

rabbah pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-cli.git


The following commit(s) were added to refs/heads/master by this push:
     new 461f94f  add OS and CPU architecture to user agent header (#344)
461f94f is described below

commit 461f94fafe405feb3c664a43f6c117bac4d3c27f
Author: David Cariello <dr...@us.ibm.com>
AuthorDate: Wed Jun 20 09:54:08 2018 -0500

    add OS and CPU architecture to user agent header (#344)
---
 commands/commands.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/commands/commands.go b/commands/commands.go
index 0e5f115..6a7a070 100644
--- a/commands/commands.go
+++ b/commands/commands.go
@@ -21,6 +21,7 @@ import (
 	"errors"
 	"net/http"
 	"os"
+	"runtime"
 
 	"github.com/apache/incubator-openwhisk-cli/wski18n"
 	"github.com/apache/incubator-openwhisk-client-go/whisk"
@@ -64,7 +65,7 @@ func SetupClientConfig(cmd *cobra.Command, args []string) error {
 		Version:           Properties.APIVersion,
 		Insecure:          Flags.Global.Insecure,
 		Host:              Properties.APIHost,
-		UserAgent:         UserAgent + "/1.0 (" + Properties.CLIVersion + ")",
+		UserAgent:         UserAgent + "/1.0 (" + Properties.CLIVersion + ") " + runtime.GOOS + " " + runtime.GOARCH,
 		AdditionalHeaders: AdditionalHeaders,
 	}