1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 10:27:06 +00:00

fixes, i18n, sitemap generator and new examples

Former-commit-id: 54801dc705ee0fa66232f65063f8a68c9cc31921
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-12-13 23:06:18 +02:00
parent c66f7a6d21
commit 04477c3e41
58 changed files with 1474 additions and 1311 deletions

View File

@@ -42,7 +42,8 @@ func (h *routerHandler) getTree(method, subdomain string) *trie {
return nil
}
func (h *routerHandler) addRoute(r *Route) error {
// AddRoute registers a route. See `Router.AddRouteUnsafe`.
func (h *routerHandler) AddRoute(r *Route) error {
var (
routeName = r.Name
method = r.Method
@@ -136,7 +137,7 @@ func (h *routerHandler) Build(provider RoutesProvider) error {
// on route, it will be stacked shown in this build state
// and no in the lines of the user's action, they should read
// the docs better. Or TODO: add a link here in order to help new users.
if err := h.addRoute(r); err != nil {
if err := h.AddRoute(r); err != nil {
// node errors:
rp.Addf("%s: %w", r.String(), err)
continue