Skip to content

Instantly share code, notes, and snippets.

Last active April 9, 2023 22:43
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
golang web dev

Resources for golang web development.



Introductory articles and tutorials


Useful packages for creating and processing form data include:



Static Content


How to share context and functionality

If you're using a middleware pattern to process HTTP requests in Go, you may want to share some data or context between middleware handlers and your application handlers.


For material specifically focused on HTTP API / web service development, see this gist.


The gorilla web toolkit provides a fairly comprehensive set of web utility packages.

For basic routing, I like httprouter ... and, along similar lines, httptreemux.

Both gin-gonic and echo appear to be nice/performant micro-web frameworks.

Other stuff ...

  • gin - live reloading
  • negroni - bidirectional middleware flow
  • render - improved templating
  • sqlx - convenient extensions to database/sql
  • cors - CORS middleware
  • goth - multi-provider authentication
  • goji - a basic router providing request context
  • gorilla/context - registry for global request variables
  • go-form-it - easy form creation and handling


Status Codes

Header Fields

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment