b943b74f by astaxie

beego:init GlobalDocApi

1 parent 67be7b53
...@@ -376,6 +376,10 @@ func initBeforeHttpRun() { ...@@ -376,6 +376,10 @@ func initBeforeHttpRun() {
376 } 376 }
377 } 377 }
378 378
379 if EnableDocs {
380 GlobalDocApi = make(map[string]interface{})
381 }
382
379 middleware.VERSION = VERSION 383 middleware.VERSION = VERSION
380 middleware.AppName = AppName 384 middleware.AppName = AppName
381 middleware.RegisterErrorHandler() 385 middleware.RegisterErrorHandler()
......
...@@ -8,12 +8,6 @@ import ( ...@@ -8,12 +8,6 @@ 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
17 func serverDocs(ctx *context.Context) { 11 func serverDocs(ctx *context.Context) {
18 var obj interface{} 12 var obj interface{}
19 if splat := ctx.Input.Param(":splat"); splat == "" { 13 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!