aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2017-04-10 21:18:42 +0100
committerNiall Sheridan <nsheridan@gmail.com>2017-04-10 21:38:33 +0100
commit30802e07b2d84fbc213b490d3402707dffe60096 (patch)
tree934aecb8f3582325dfd1aa6652193adac87d00db /vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go
parentda7638dc112c4c106e8929601b642d2ca4596cba (diff)
update dependencies
Diffstat (limited to 'vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go')
-rw-r--r--vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go41
1 files changed, 41 insertions, 0 deletions
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go b/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go
new file mode 100644
index 0000000..e8cf93d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go
@@ -0,0 +1,41 @@
+// +build !go1.7
+
+package aws
+
+import "time"
+
+// An emptyCtx is a copy of the the Go 1.7 context.emptyCtx type. This
+// is copied to provide a 1.6 and 1.5 safe version of context that is compatible
+// with Go 1.7's Context.
+//
+// An emptyCtx is never canceled, has no values, and has no deadline. It is not
+// struct{}, since vars of this type must have distinct addresses.
+type emptyCtx int
+
+func (*emptyCtx) Deadline() (deadline time.Time, ok bool) {
+ return
+}
+
+func (*emptyCtx) Done() <-chan struct{} {
+ return nil
+}
+
+func (*emptyCtx) Err() error {
+ return nil
+}
+
+func (*emptyCtx) Value(key interface{}) interface{} {
+ return nil
+}
+
+func (e *emptyCtx) String() string {
+ switch e {
+ case backgroundCtx:
+ return "aws.BackgroundContext"
+ }
+ return "unknown empty Context"
+}
+
+var (
+ backgroundCtx = new(emptyCtx)
+)