mirror of
https://github.com/beego/bee.git
synced 2024-11-22 05:00:54 +00:00
add tips where not exist the swagger files
This commit is contained in:
parent
05c7d51efa
commit
22f4c92022
@ -68,6 +68,10 @@ func runDocs(cmd *Command, args []string) {
|
|||||||
if docport == "" {
|
if docport == "" {
|
||||||
docport = "8089"
|
docport = "8089"
|
||||||
}
|
}
|
||||||
|
if _, err := os.Stat("swagger"); err != nil && os.IsNotExist(err) {
|
||||||
|
fmt.Println("there's no swagger, please use bee rundocs -isDownload=true downlaod first")
|
||||||
|
os.Exit(2)
|
||||||
|
}
|
||||||
fmt.Println("start the docs server on: http://127.0.0.1:" + docport)
|
fmt.Println("start the docs server on: http://127.0.0.1:" + docport)
|
||||||
log.Fatal(http.ListenAndServe(":"+string(docport), http.FileServer(http.Dir("swagger"))))
|
log.Fatal(http.ListenAndServe(":"+string(docport), http.FileServer(http.Dir("swagger"))))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user