From 66041d132f3c6f2d1fff5e8dacba2d84367117f5 Mon Sep 17 00:00:00 2001 From: Anchor Date: Sun, 18 Jan 2015 20:58:36 -0800 Subject: [PATCH] Fix section "Routing with Beego" in 13.2.md --- en/13.2.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/en/13.2.md b/en/13.2.md index 3cb0f498..3cd5b273 100644 --- a/en/13.2.md +++ b/en/13.2.md @@ -44,15 +44,15 @@ When the application is running, the Go server listens to a port. When it receiv } } -## Beego routing framework to achieve +## Routing with Beego -Almost all Web applications are based routing to achieve http default router, but the router comes Go has several limitations: +At present, most Go web applications base their routing on `http`'s default router, however this has several limitations: -- Does not support parameter setting, such as/user/: uid This pan type matching -- Not very good support for REST mode, you can not restrict access methods, such as the above example, user access/foo, you can use GET, POST, DELETE, HEAD, etc. Access -- General site routing rules too much, write cumbersome. I'm in front of an API to develop their own applications, routing rules have thirty several, in fact, this route after more than can be further simplified by a simplified method of the struct +-Does not support dynamic routes with parameters, such as `the/user/:UID` +-Does not have good support for REST. The access methods cannot be restricted; for instance in the above example, when users access `/foo`, they can use the GET, POST, DELETE, and HEAD HTTP methods, among others. +- In large apps, routing rules can become repetitive and cumbersome. Personally, I've developed simple web APIs composed of nearly thirty routing rules when in fact, these rules could have been further simplified using method structs. -beego framework routers based on the above few limitations to consider the design of a REST approach to achieve routing, routing design is based on two points above the default design Go to consider: store -and-forward routing routing +The Beego framework's router is designed to overcome these limitations, taking the REST paradigm into consideration and simplifying the storing and forwarding of routes and requests. ### Storing a routing