aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/google.golang.org/api/gensupport/header.go
diff options
context:
space:
mode:
authorbojie <bojie@dexon.org>2018-12-28 13:15:06 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:20 +0800
commit3d46f69a10a60324ee6af0c96d064cc73ed5c37d (patch)
treeae9dd76f3f9a69c0acb18f6b0343601558d2e00f /vendor/google.golang.org/api/gensupport/header.go
parent2426b985ae9773afe12f5a9f982cf4f2629f81a3 (diff)
downloadgo-tangerine-3d46f69a10a60324ee6af0c96d064cc73ed5c37d.tar.gz
go-tangerine-3d46f69a10a60324ee6af0c96d064cc73ed5c37d.tar.zst
go-tangerine-3d46f69a10a60324ee6af0c96d064cc73ed5c37d.zip
app: use gcp storage instead of azure for builds (#81)
* vendor: add dependencies for using GCP storage * app: use gcp storage instead of azure for builds
Diffstat (limited to 'vendor/google.golang.org/api/gensupport/header.go')
-rw-r--r--vendor/google.golang.org/api/gensupport/header.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/vendor/google.golang.org/api/gensupport/header.go b/vendor/google.golang.org/api/gensupport/header.go
new file mode 100644
index 000000000..cb5e67c77
--- /dev/null
+++ b/vendor/google.golang.org/api/gensupport/header.go
@@ -0,0 +1,22 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package gensupport
+
+import (
+ "fmt"
+ "runtime"
+ "strings"
+)
+
+// GoogleClientHeader returns the value to use for the x-goog-api-client
+// header, which is used internally by Google.
+func GoogleClientHeader(generatorVersion, clientElement string) string {
+ elts := []string{"gl-go/" + strings.Replace(runtime.Version(), " ", "_", -1)}
+ if clientElement != "" {
+ elts = append(elts, clientElement)
+ }
+ elts = append(elts, fmt.Sprintf("gdcl/%s", generatorVersion))
+ return strings.Join(elts, " ")
+}