v0.0.564 always return non-nil ctx from ginext.Start() (improves nilaway)
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 2m7s
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 2m7s
This commit is contained in:
@@ -25,6 +25,15 @@ func CreateAppContext(g *gin.Context, innerCtx context.Context, cancelFn context
|
||||
}
|
||||
}
|
||||
|
||||
func CreateBackgroundAppContext() *AppContext {
|
||||
return &AppContext{
|
||||
inner: context.Background(),
|
||||
cancelFunc: nil,
|
||||
cancelled: false,
|
||||
GinContext: nil,
|
||||
}
|
||||
}
|
||||
|
||||
func (ac *AppContext) Deadline() (deadline time.Time, ok bool) {
|
||||
return ac.inner.Deadline()
|
||||
}
|
||||
|
Reference in New Issue
Block a user