aboutsummaryrefslogtreecommitdiff
path: root/vendor/google.golang.org/api/gensupport/go18.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/google.golang.org/api/gensupport/go18.go')
-rw-r--r--vendor/google.golang.org/api/gensupport/go18.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/vendor/google.golang.org/api/gensupport/go18.go b/vendor/google.golang.org/api/gensupport/go18.go
new file mode 100644
index 0000000..c76cb8f
--- /dev/null
+++ b/vendor/google.golang.org/api/gensupport/go18.go
@@ -0,0 +1,17 @@
+// Copyright 2018 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.
+
+// +build go1.8
+
+package gensupport
+
+import (
+ "io"
+ "net/http"
+)
+
+// SetGetBody sets the GetBody field of req to f.
+func SetGetBody(req *http.Request, f func() (io.ReadCloser, error)) {
+ req.GetBody = f
+}