1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-09 13:05:56 +00:00
Former-commit-id: d4eebea0b5849c574e2ffd4b0bb36e4380b14111
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-04-29 05:50:29 +03:00
parent 2a4043a3c2
commit ac08f53ba0
4 changed files with 94 additions and 86 deletions

View File

@@ -386,18 +386,8 @@ func (r *Route) Trace(w io.Writer) {
}
path := r.Tmpl().Src
if subdomain := r.Subdomain; subdomain != "" {
if path == "" {
path = "/"
}
if subdomain == "*." { // wildcard.
subdomain = "subdomain"
}
r.Description = fmt.Sprintf("%s", subdomain)
// path = fmt.Sprintf("%s %s", r.Subdomain, path)
if path == "" {
path = "/"
}
// @method: @path
@@ -408,8 +398,22 @@ func (r *Route) Trace(w io.Writer) {
// (@description)
description := r.Description
if description == "" && r.Method == MethodNone {
description = "offline"
if description == "" {
if r.Method == MethodNone {
description = "offline"
}
if subdomain := r.Subdomain; subdomain != "" {
if subdomain == "*." { // wildcard.
subdomain = "subdomain"
}
if description == "offline" {
description += ", "
}
description += subdomain
}
}
if description != "" {