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/07/09 21:56:03 UTC

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

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-client-go.git


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

commit df79c14dab895db6f2371fb5dbe734a4a1185ceb
Author: David Cariello <dr...@us.ibm.com>
AuthorDate: Mon Jul 9 16:55:59 2018 -0500

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

diff --git a/whisk/client.go b/whisk/client.go
index 58a29b7..d6f2597 100644
--- a/whisk/client.go
+++ b/whisk/client.go
@@ -31,6 +31,7 @@ import (
 	"net/url"
 	"reflect"
 	"regexp"
+	"runtime"
 	"strings"
 	"time"
 )
@@ -148,7 +149,7 @@ func NewClient(httpClient *http.Client, config_input *Config) (*Client, error) {
 	}
 
 	if len(config.UserAgent) == 0 {
-		config.UserAgent = "OpenWhisk-Go-Client"
+		config.UserAgent = "OpenWhisk-Go-Client " + runtime.GOOS + " " + runtime.GOARCH
 	}
 
 	c := &Client{