From a39a55a3c60572ca692c8e2056fccdb4e2d146ba Mon Sep 17 00:00:00 2001 From: Julien Neuhart Date: Fri, 30 Mar 2018 17:13:22 +0200 Subject: [PATCH] godoc for handlers package --- app/handlers/handlers.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/handlers/handlers.go b/app/handlers/handlers.go index 178e983a..0d3afc21 100644 --- a/app/handlers/handlers.go +++ b/app/handlers/handlers.go @@ -1,3 +1,4 @@ +// Package handlers implements all functions on which a request will pass through. package handlers import ( @@ -14,10 +15,14 @@ import ( "github.com/justinas/alice" ) +// GetHandlersChain returns the handlers chaining +// thanks to the alice library. func GetHandlersChain() http.Handler { return alice.New(enforceContentLengthHandler, enforceContentTypeHandler, convertHandler, serveHandler).ThenFunc(clearHandler) } +// requestHasNoContentError is raised when the request +// content length is 0. type requestHasNoContentError struct{} func (e *requestHasNoContentError) Error() string {