type Context interface { Deadline() (time.Time, bool) Err() error value(key any) any Done() <-chanstruct{} }
emptyContext
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
// 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 }