mirror of
https://github.com/minio/minio.git
synced 2025-11-24 19:46:16 -05:00
Fix all the golint complaints about newly added changes
Do not use func(this *server), such generic names should not be used for writing struct methods.
This commit is contained in:
@@ -25,6 +25,7 @@ import (
|
||||
"github.com/rs/cors"
|
||||
)
|
||||
|
||||
// MiddlewareHandler - useful to chain different middleware http.Handler
|
||||
type MiddlewareHandler func(http.Handler) http.Handler
|
||||
|
||||
type contentTypeHandler struct {
|
||||
@@ -153,6 +154,7 @@ func (h validateAuthHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
}
|
||||
|
||||
// CorsHandler handler for CORS (Cross Origin Resource Sharing)
|
||||
func CorsHandler(h http.Handler) http.Handler {
|
||||
return cors.Default().Handler(h)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user