Anthony Alaribe
1 min readJul 16, 2018

--

Nice work, Ajinkya. That a nice structure you have there.

I tend to prefer having the handlers defined outside of the route definitions. I realised it results in neater code that is easy to scan through, especially as a project grows larger.

Also, you can leave off adding the Types when creating a map literall. I created a Go Playground to show this: https://play.golang.org/p/gjNyC6dQhwb

Awesome work.

--

--

Anthony Alaribe
Anthony Alaribe

Written by Anthony Alaribe

I help solve business challenges using technology. Golang and Web optimisation (PWA, service workers, progressive enhancement)

Responses (2)