diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-05-08 17:36:54 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-08 17:36:54 +0800 |
commit | cb700aedd1e670fb47b8cf0cd67fb117a1ad88a2 (patch) | |
tree | 90cdc8e732b1c498bf5113accad8dc4245a059ac /routers/web/repo/view.go | |
parent | ff5629268c5c01d3f460570baa571baef3f896cd (diff) | |
download | gitea-cb700aedd1e670fb47b8cf0cd67fb117a1ad88a2.tar.gz gitea-cb700aedd1e670fb47b8cf0cd67fb117a1ad88a2.zip |
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.
Diffstat (limited to 'routers/web/repo/view.go')
-rw-r--r-- | routers/web/repo/view.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/repo/view.go b/routers/web/repo/view.go index 9f2770a3ac..2bf293cbda 100644 --- a/routers/web/repo/view.go +++ b/routers/web/repo/view.go @@ -66,7 +66,7 @@ func findReadmeFileInEntries(ctx *context.Context, entries []*git.TreeEntry, try // 1. Markdown files - with and without localisation - e.g. README.en-us.md or README.md // 2. Txt files - e.g. README.txt // 3. No extension - e.g. README - exts := append(localizedExtensions(".md", ctx.Language()), ".txt", "") // sorted by priority + exts := append(localizedExtensions(".md", ctx.Locale.Language()), ".txt", "") // sorted by priority extCount := len(exts) readmeFiles := make([]*git.TreeEntry, extCount+1) |