修复没有备注时生成文档报错

This commit is contained in:
xiangheng
2023-12-21 16:15:24 +08:00
parent bce060c758
commit cefdc294ef
4 changed files with 15 additions and 11 deletions

View File

@@ -99,6 +99,10 @@ func main() {
// 初始化router
router := initRouter()
router.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerfiles.Handler))
fmt.Println("格式化文档注释:", "swag fmt")
fmt.Println("生成文档:", "swag init")
fmt.Println("文档:", "http://localhost:8001/swagger/index.html")
// 初始化server
s := initServer(router)