mirror of
https://github.com/astaxie/beego.git
synced 2024-11-26 08:51:29 +00:00
beego:init GlobalDocApi
This commit is contained in:
parent
67be7b532d
commit
b943b74fc5
4
beego.go
4
beego.go
@ -376,6 +376,10 @@ func initBeforeHttpRun() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if EnableDocs {
|
||||||
|
GlobalDocApi = make(map[string]interface{})
|
||||||
|
}
|
||||||
|
|
||||||
middleware.VERSION = VERSION
|
middleware.VERSION = VERSION
|
||||||
middleware.AppName = AppName
|
middleware.AppName = AppName
|
||||||
middleware.RegisterErrorHandler()
|
middleware.RegisterErrorHandler()
|
||||||
|
6
docs.go
6
docs.go
@ -8,12 +8,6 @@ import (
|
|||||||
|
|
||||||
var GlobalDocApi map[string]interface{}
|
var GlobalDocApi map[string]interface{}
|
||||||
|
|
||||||
func init() {
|
|
||||||
if EnableDocs {
|
|
||||||
GlobalDocApi = make(map[string]interface{})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func serverDocs(ctx *context.Context) {
|
func serverDocs(ctx *context.Context) {
|
||||||
var obj interface{}
|
var obj interface{}
|
||||||
if splat := ctx.Input.Param(":splat"); splat == "" {
|
if splat := ctx.Input.Param(":splat"); splat == "" {
|
||||||
|
Loading…
Reference in New Issue
Block a user