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@dexon.org>2019-04-09 21:32:55 +0800
commit9ca2a528ef0f3819b4921a33a3a2110d291707e0 (patch)
tree5520bb35b6de0ee1844f52f53a55c7b716955f49 /vendor/google.golang.org/api/gensupport/header.go
parentfe239cd01509d340d3450e0275f60f0536ec5455 (diff)
downloaddexon-9ca2a528ef0f3819b4921a33a3a2110d291707e0.tar.gz
dexon-9ca2a528ef0f3819b4921a33a3a2110d291707e0.tar.zst
dexon-9ca2a528ef0f3819b4921a33a3a2110d291707e0.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, " ")
+}