summaryrefslogtreecommitdiffstats
path: root/docs/content/doc/developers/guidelines-backend.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/content/doc/developers/guidelines-backend.md')
-rw-r--r--docs/content/doc/developers/guidelines-backend.md6
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