server.go T�g�U ��g�U package main import ( "fmt" "log" "net/http" "html/template" "github.com/gorilla/sessions" "github.com/jmoiron/sqlx" "github.com/zenazn/goji/graceful" "github.com/zenazn/goji/web" ) // appContext contains our local context; our database pool, session store, template // registry and anything else our handlers need to access. We'll create an instance of it // in our main() func
![Custom Handlers and Avoiding Globals in Go Web Applications - http://elithrar.github.io/article/custom-handlers-avoiding-globals/ - more recent take here: http://elithrar.github.io/article/http-handler-error-handling-revisited/](https://cdn-ak-scissors.b.st-hatena.com/image/square/1ef26f6cb4349557952890dbe3e567f7f98dc151/height=288;version=1;width=512/https%3A%2F%2Fgithub.githubassets.com%2Fassets%2Fgist-og-image-54fd7dc0713e.png)