diff options
author | Greg Myers <myersg86@gmail.com> | 2022-01-09 04:53:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-09 19:53:03 +0800 |
commit | 79791ba4ac8ebdfa58f5307de78d526ad6d399d3 (patch) | |
tree | 7acb5705f894fae942e5bf5b5c788f17991ed721 /docs/content/doc/developers/guidelines-backend.md | |
parent | de578bff8c7b782953689085d223d06d2feaa1d5 (diff) | |
download | gitea-79791ba4ac8ebdfa58f5307de78d526ad6d399d3.tar.gz gitea-79791ba4ac8ebdfa58f5307de78d526ad6d399d3.zip |
Fix typos in docs/content (#18215)
Diffstat (limited to 'docs/content/doc/developers/guidelines-backend.md')
-rw-r--r-- | docs/content/doc/developers/guidelines-backend.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/content/doc/developers/guidelines-backend.md b/docs/content/doc/developers/guidelines-backend.md index eb58ceb758..d249465453 100644 --- a/docs/content/doc/developers/guidelines-backend.md +++ b/docs/content/doc/developers/guidelines-backend.md @@ -43,8 +43,8 @@ To maintain understandable code and avoid circular dependencies it is important - `modules/git`: Package to interactive with `Git` command line or Gogit package. - `public`: Compiled frontend files (javascript, images, css, etc.) - `routers`: Handling of server requests. As it uses other Gitea packages to serve the request, other packages (models, modules or services) shall not depend on routers. - - `routers/api` Conatins routers for `/api/v1` aims to handle RESTful API requests. - - `routers/install` Could only reponse when system is INSTALL mode. + - `routers/api` Contains routers for `/api/v1` aims to handle RESTful API requests. + - `routers/install` Could only respond when system is in INSTALL mode (INSTALL_LOCK=false). - `routers/private` will only be invoked by internal sub commands, especially `serv` and `hooks`. - `routers/web` will handle HTTP requests from web browsers or Git SMART HTTP protocols. - `services`: Support functions for common routing operations or command executions. Uses `models` and `modules` to handle the requests. @@ -103,7 +103,7 @@ i.e. `servcies/user`, `models/repository`. ### Import Alias -Since there are many package levels and sub packages, so you will find `modules/user`, `models/user`, `services/user`. When these packages are import into one Go file, it's difficult to know which package we are using and if it's a variable name or an import name. So we recommand to always use import alias. To differ from package variables which are commonly use camelCase, just use **snake_case** as import package alias. +Since there are some packages which use the same package name, it is possible that you find packages like `modules/user`, `models/user`, and `services/user`. When these packages are imported in one Go file, it's difficult to know which package we are using and if it's a variable name or an import name. So, we always recommend to use import aliases. To differ from package variables which are commonly in camelCase, just use **snake_case** for import aliases. i.e. `import user_service "code.gitea.io/gitea/services/user"` ### Future Tasks |