mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 04:48:26 +08:00
chore: update golang (to 1.20.x) and golangci-linter (#1388)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
committed by
GitHub
parent
9cc990d7ca
commit
635d07ae04
@@ -21,7 +21,7 @@ func SetupSwaggerRoutes(conf *config.Config, router *mux.Router, authFunc mux.Mi
|
||||
log log.Logger,
|
||||
) {
|
||||
log.Info().Msg("setting up swagger route")
|
||||
// swagger swagger "/swagger/v2/index.html"
|
||||
// swagger "/swagger/v2/index.html"
|
||||
swgRouter := router.PathPrefix("/swagger/v2/").Subrouter()
|
||||
swgRouter.Use(authFunc)
|
||||
swgRouter.Methods("GET").Handler(httpSwagger.WrapHandler)
|
||||
|
||||
@@ -11,15 +11,14 @@ import (
|
||||
"github.com/gorilla/mux"
|
||||
|
||||
"zotregistry.io/zot/pkg/api/config"
|
||||
"zotregistry.io/zot/pkg/log" //nolint:goimports
|
||||
// as required by swaggo.
|
||||
"zotregistry.io/zot/pkg/log"
|
||||
_ "zotregistry.io/zot/swagger"
|
||||
)
|
||||
|
||||
func SetupSwaggerRoutes(conf *config.Config, router *mux.Router, authFunc mux.MiddlewareFunc,
|
||||
log log.Logger,
|
||||
) {
|
||||
// swagger swagger "/swagger/v2/index.html"
|
||||
// swagger "/swagger/v2/index.html"
|
||||
log.Warn().Msg("skipping enabling swagger because given zot binary " +
|
||||
"doesn't include this feature, please build a binary that does so")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user