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

This commit is contained in:
2025-02-10 13:04:05 +01:00
parent 4832aa9d6c
commit 5e6cb63f14
5 changed files with 47 additions and 22 deletions

View File

@@ -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()
}