]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blame - vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go
deps: use go modules for dep mgmt
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / aws / aws-sdk-go / aws / context_1_6.go
CommitLineData
bae9f6d2
JC
1// +build !go1.7
2
3package aws
4
5import "time"
6
7// An emptyCtx is a copy of the the Go 1.7 context.emptyCtx type. This
8// is copied to provide a 1.6 and 1.5 safe version of context that is compatible
9// with Go 1.7's Context.
10//
11// An emptyCtx is never canceled, has no values, and has no deadline. It is not
12// struct{}, since vars of this type must have distinct addresses.
13type emptyCtx int
14
15func (*emptyCtx) Deadline() (deadline time.Time, ok bool) {
16 return
17}
18
19func (*emptyCtx) Done() <-chan struct{} {
20 return nil
21}
22
23func (*emptyCtx) Err() error {
24 return nil
25}
26
27func (*emptyCtx) Value(key interface{}) interface{} {
28 return nil
29}
30
31func (e *emptyCtx) String() string {
32 switch e {
33 case backgroundCtx:
34 return "aws.BackgroundContext"
35 }
36 return "unknown empty Context"
37}
38
39var (
40 backgroundCtx = new(emptyCtx)
41)