beego:rever docs
Showing
2 changed files
with
6 additions
and
4 deletions
| ... | @@ -376,10 +376,6 @@ func initBeforeHttpRun() { | ... | @@ -376,10 +376,6 @@ func initBeforeHttpRun() { |
| 376 | } | 376 | } |
| 377 | } | 377 | } |
| 378 | 378 | ||
| 379 | if EnableDocs { | ||
| 380 | GlobalDocApi = make(map[string]interface{}) | ||
| 381 | } | ||
| 382 | |||
| 383 | middleware.VERSION = VERSION | 379 | middleware.VERSION = VERSION |
| 384 | middleware.AppName = AppName | 380 | middleware.AppName = AppName |
| 385 | middleware.RegisterErrorHandler() | 381 | middleware.RegisterErrorHandler() | ... | ... |
| ... | @@ -8,6 +8,12 @@ import ( | ... | @@ -8,6 +8,12 @@ import ( |
| 8 | 8 | ||
| 9 | var GlobalDocApi map[string]interface{} | 9 | var GlobalDocApi map[string]interface{} |
| 10 | 10 | ||
| 11 | func init() { | ||
| 12 | if EnableDocs { | ||
| 13 | GlobalDocApi = make(map[string]interface{}) | ||
| 14 | } | ||
| 15 | } | ||
| 16 | |||
| 11 | func serverDocs(ctx *context.Context) { | 17 | func serverDocs(ctx *context.Context) { |
| 12 | var obj interface{} | 18 | var obj interface{} |
| 13 | if splat := ctx.Input.Param(":splat"); splat == "" { | 19 | if splat := ctx.Input.Param(":splat"); splat == "" { | ... | ... |
-
Please register or sign in to post a comment