How do you handle Dependency Injection in gitea codebase?

Hello Gitea community,

I’m currently refactoring several of my go-lang and Node.js projects. And there is on fact which drives me nuts:

Most more complex projects like gitea use internal helper modules/package like config and logger.
If I get this right, the dependency injection pattern suggests to pass all dependencies as params or constructor arguments, instead of loading them directly.

How do you managed to solve this in the gitea codebase? Is is there really a downside except of the testcase / mocking issue?

I guess it’s mostly answered in Guidelines for Backend Development - Docs.