From 53264dfb24b7c56ee2e4a4e11b55b0539b2301e4 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 30 Apr 2023 03:30:19 -0400 Subject: [PATCH] refactor: change var name to not conflict --- main.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 53b0c62..e277440 100644 --- a/main.go +++ b/main.go @@ -58,7 +58,7 @@ func main() { app.Handle(new(service.AuthService)) }) - config := swagger.Config{ + swaggerConfig := swagger.Config{ // The url pointing to API definition. URL: "http://localhost:8080/swagger/doc.json", DeepLinking: true, @@ -67,7 +67,7 @@ func main() { // The UI prefix URL (see route). Prefix: "/swagger", } - swaggerUI := swagger.Handler(swaggerFiles.Handler, config) + swaggerUI := swagger.Handler(swaggerFiles.Handler, swaggerConfig) app.Get("/swagger", swaggerUI) // And the wildcard one for index.html, *.js, *.css and e.t.c. @@ -77,5 +77,10 @@ func main() { //go renterd.Main() // Start the Iris app and listen for incoming requests on port 80 - log.Fatal(app.Listen(":80")) + log.Fatal(app.Listen(":8080", func(app *iris.Application) { + routes := app.GetRoutes() + for _, route := range routes { + log.Println(route) + } + })) }