Story Details

Writing Handsome Golang Middleware by @laicos

Posted By tutorialStash on Golang - My aim in this endeavor is to:

Create a clean route definition.
Be compatible with std router & popular ones like Gorilla MUX & HttpRouter.
Allow contextual info to ride the chain.
Write as little code as possible.
Be intuitive, don’t diverge.
Maybe introduce a common error handler.

Submit a Comment

Log in to comment or register here