720a77c1 by astaxie

beego:rever docs

1 parent b943b74f
...@@ -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 == "" {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!