mirror of
https://github.com/kataras/iris.git
synced 2026-01-08 20:41:57 +00:00
reorganization of _examples and add some new examples such as iris+groupcache+mysql+docker
Former-commit-id: ed635ee95de7160cde11eaabc0c1dcb0e460a620
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"net/http"
|
||||
"sort"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/kataras/iris/v12/context"
|
||||
"github.com/kataras/iris/v12/core/errgroup"
|
||||
@@ -234,7 +235,13 @@ func (h *routerHandler) Build(provider RoutesProvider) error {
|
||||
|
||||
bckpNewLine := logger.NewLine
|
||||
logger.NewLine = false
|
||||
logger.Debugf("API: %d registered %s (", len(registeredRoutes), tr)
|
||||
debugLevel := golog.Levels[golog.DebugLevel]
|
||||
// Replace that in order to not transfer it to the log handler (e.g. json)
|
||||
// logger.Debugf("API: %d registered %s (", len(registeredRoutes), tr)
|
||||
// with:
|
||||
pio.WriteRich(logger.Printer, debugLevel.Title, debugLevel.ColorCode, debugLevel.Style...)
|
||||
fmt.Fprintf(logger.Printer, " %s API: %d registered %s (", time.Now().Format(logger.TimeFormat), len(registeredRoutes), tr)
|
||||
//
|
||||
logger.NewLine = bckpNewLine
|
||||
|
||||
for i, m := range methodRoutes {
|
||||
|
||||
@@ -58,7 +58,7 @@ func pathIsWildcard(partyRelPath string) bool {
|
||||
// NewSubdomainRedirectWrapper may return nil if not allowed input arguments values were received
|
||||
// but in that case, the `WrapRouter` will, simply, ignore that wrapper.
|
||||
//
|
||||
// Example: https://github.com/kataras/iris/tree/master/_examples/subdomains/redirect
|
||||
// Example: https://github.com/kataras/iris/tree/master/_examples/routing/subdomains/redirect
|
||||
func NewSubdomainRedirectWrapper(rootDomainGetter func() string, from, to string) WrapperFunc {
|
||||
// we can return nil,
|
||||
// because if wrapper is nil then it's not be used on the `router#WrapRouter`.
|
||||
|
||||
Reference in New Issue
Block a user