mirror of
https://github.com/beego/bee.git
synced 2024-11-22 20:20:55 +00:00
Merge pull request #122 from simpleton/bug/docs
make docs works when EnableDocs = false
This commit is contained in:
commit
f74078b69f
@ -55,6 +55,7 @@ var rootapi swagger.ResourceListing
|
|||||||
var apilist map[string]*swagger.ApiDeclaration
|
var apilist map[string]*swagger.ApiDeclaration
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
if beego.EnableDocs {
|
||||||
err := json.Unmarshal([]byte(Rootinfo), &rootapi)
|
err := json.Unmarshal([]byte(Rootinfo), &rootapi)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
beego.Error(err)
|
beego.Error(err)
|
||||||
@ -73,6 +74,7 @@ func init() {
|
|||||||
beego.GlobalDocApi[strings.Trim(k, "/")] = v
|
beego.GlobalDocApi[strings.Trim(k, "/")] = v
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
func urlReplace(src string) string {
|
func urlReplace(src string) string {
|
||||||
|
Loading…
Reference in New Issue
Block a user