backend/dep/provider/routes.go
package provider import ( "github.com/short-d/app/fw/router" "github.com/short-d/app/fw/timer" "github.com/short-d/short/backend/app/adapter/facebook" "github.com/short-d/short/backend/app/adapter/github" "github.com/short-d/short/backend/app/adapter/google" "github.com/short-d/short/backend/app/adapter/request" "github.com/short-d/short/backend/app/adapter/routing" "github.com/short-d/short/backend/app/usecase/authenticator" "github.com/short-d/short/backend/app/usecase/feature" "github.com/short-d/short/backend/app/usecase/search" "github.com/short-d/short/backend/app/usecase/shortlink") // WebFrontendURL represents the URL of the web frontendtype WebFrontendURL string // SwaggerUIDir represents the root directory of Swagger UI static assets.type SwaggerUIDir string // OpenAPISpecPath represents the location of OpenAPI specification.type OpenAPISpecPath string // NewShortRoutes creates HTTP routes for Short API with WwwRoot to uniquely identify WwwRoot during dependency injection.Similar blocks of code found in 2 locations. Consider refactoring.func NewShortRoutes(Function `NewShortRoutes` has 12 arguments (exceeds 4 allowed). Consider refactoring. instrumentationFactory request.InstrumentationFactory, webFrontendURL WebFrontendURL, timer timer.Timer, shortLinkRetriever shortlink.Retriever, featureDecisionMakerFactory feature.DecisionMakerFactory, githubSSO github.SingleSignOn, facebookSSO facebook.SingleSignOn, googleSSO google.SingleSignOn, authenticator authenticator.Authenticator, search search.Search, swaggerUIDir SwaggerUIDir, openAPISpecPath OpenAPISpecPath,) []router.Route { return routing.NewShort( instrumentationFactory, string(webFrontendURL), timer, shortLinkRetriever, featureDecisionMakerFactory, githubSSO, facebookSSO, googleSSO, authenticator, search, string(swaggerUIDir), string(openAPISpecPath), )}