aboutsummaryrefslogtreecommitdiff
path: root/vendor/google.golang.org/api/googleapi/internal/uritemplates/utils.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/google.golang.org/api/googleapi/internal/uritemplates/utils.go')
-rw-r--r--vendor/google.golang.org/api/googleapi/internal/uritemplates/utils.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/vendor/google.golang.org/api/googleapi/internal/uritemplates/utils.go b/vendor/google.golang.org/api/googleapi/internal/uritemplates/utils.go
new file mode 100644
index 0000000..eff260a
--- /dev/null
+++ b/vendor/google.golang.org/api/googleapi/internal/uritemplates/utils.go
@@ -0,0 +1,13 @@
+// Copyright 2016 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 uritemplates
+
+func Expand(path string, values map[string]string) (string, error) {
+ template, err := parse(path)
+ if err != nil {
+ return "", err
+ }
+ return template.Expand(values), nil
+}