diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-06-19 06:32:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-19 06:32:45 +0800 |
commit | 43c7a2e7b1c7fb8aa2347d82ad0a6886d6fad9c2 (patch) | |
tree | c98c2e1159ee02eb52282811f28a4c31ad222c67 /routers/api/v1/misc/gitignore.go | |
parent | 17baf1af10de025a47ade1f16f1e5c51646d7fcf (diff) | |
download | gitea-43c7a2e7b1c7fb8aa2347d82ad0a6886d6fad9c2.tar.gz gitea-43c7a2e7b1c7fb8aa2347d82ad0a6886d6fad9c2.zip |
Refactor names (#31405)
This PR only does "renaming":
* `Route` should be `Router` (and chi router is also called "router")
* `Params` should be `PathParam` (to distingush it from URL query param, and to match `FormString`)
* Use lower case for private functions to avoid exposing or abusing
Diffstat (limited to 'routers/api/v1/misc/gitignore.go')
-rw-r--r-- | routers/api/v1/misc/gitignore.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/misc/gitignore.go b/routers/api/v1/misc/gitignore.go index dffd771752..b0bf00a921 100644 --- a/routers/api/v1/misc/gitignore.go +++ b/routers/api/v1/misc/gitignore.go @@ -44,7 +44,7 @@ func GetGitignoreTemplateInfo(ctx *context.APIContext) { // "$ref": "#/responses/GitignoreTemplateInfo" // "404": // "$ref": "#/responses/notFound" - name := util.PathJoinRelX(ctx.Params("name")) + name := util.PathJoinRelX(ctx.PathParam("name")) text, err := options.Gitignore(name) if err != nil { |