]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blob - vendor/google.golang.org/api/gensupport/header.go
Upgrade to 0.12
[github/fretlink/terraform-provider-statuscake.git] / vendor / google.golang.org / api / gensupport / header.go
1 // Copyright 2017 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 package gensupport
6
7 import (
8 "fmt"
9 "runtime"
10 "strings"
11 )
12
13 // GoogleClientHeader returns the value to use for the x-goog-api-client
14 // header, which is used internally by Google.
15 func GoogleClientHeader(generatorVersion, clientElement string) string {
16 elts := []string{"gl-go/" + strings.Replace(runtime.Version(), " ", "_", -1)}
17 if clientElement != "" {
18 elts = append(elts, clientElement)
19 }
20 elts = append(elts, fmt.Sprintf("gdcl/%s", generatorVersion))
21 return strings.Join(elts, " ")
22 }