diff --git a/docs.go b/docs.go index a660ddeb..1dbed6cc 100644 --- a/docs.go +++ b/docs.go @@ -21,10 +21,12 @@ import ( ) // GlobalDocAPI store the swagger api documents -var GlobalDocAPI map[string]interface{}=make(map[string]interface{}) +var GlobalDocAPI map[string]interface{} func init() { - + if EnableDocs { + GlobalDocAPI = make(map[string]interface{}) + } } func serverDocs(ctx *context.Context) {