feat: add new function to get engine from Context type

This commit is contained in:
Youssef Ayman 2025-06-23 16:06:34 +03:00
parent cf4775283e
commit 216226acae

View File

@ -93,6 +93,14 @@ type Context struct {
sameSite http.SameSite sameSite http.SameSite
} }
// Get Engine from Context to handle contexts
func (c *Context) GetEngine() *Engine {
if c.engine == nil {
panic("context engine is nil")
}
return c.engine
}
/************************************/ /************************************/
/********** CONTEXT CREATION ********/ /********** CONTEXT CREATION ********/
/************************************/ /************************************/