github.com/qiniu/go-sdk/v7@v7.27.0/internal/context/go1.20.go (about) 1 //go:build 1.20 2 // +build 1.20 3 4 package context 5 6 import ( 7 "context" 8 ) 9 10 type ( 11 Context = context.Context 12 CancelCauseFunc = context.CancelCauseFunc 13 ) 14 15 func Cause(c Context) error { 16 return Cause(c) 17 } 18 19 func WithCancelCause(parent Context) (ctx Context, cancel CancelCauseFunc) { 20 return context.WithCancelCause(parent) 21 } 22 23 func Background() Context { 24 return context.Background() 25 }