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:
Harshavardhana
2015-09-17 18:53:40 -07:00
parent 9e7e00e270
commit 1887114444
6 changed files with 37 additions and 21 deletions

View File

@@ -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)
}