Gin-way dependency injection

What is the better way inject services?
Database for example, template-cache, etc.
Should I use gin.Context.Keys via middlewares or Use gin.HandlerFunc as struct such as controller in MVC.
What are you thinking about including it in doc for DI or testing example?

I think that context wasn’t maked for dependencies and inject to struct actually looks more friendly.

1 possible answer(s) on “Gin-way dependency injection