Split "modules/context.go" to separate files (#24569)

The "modules/context.go" is too large to maintain.

This PR splits it to separate files, eg: context_request.go,
context_response.go, context_serve.go

This PR will help:

1. The future refactoring for Gitea's web context (eg: simplify the context)
2. Introduce proper "range request" support
3. Introduce context function

This PR only moves code, doesn't change any logic.
This commit is contained in:
wxiaoguang 2023-05-08 17:36:54 +08:00 committed by GitHub
parent ff5629268c
commit cb700aedd1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 747 additions and 676 deletions

View file

@ -35,9 +35,6 @@ import (
"xorm.io/builder"
)
// ItemsPerPage maximum items per page in forks, watchers and stars of a repo
var ItemsPerPage = 40
// Init initialize model
func Init(ctx context.Context) error {
if err := unit.LoadUnitConfig(); err != nil {