github.com/dstroot/postgres-api (go): Package main initializes the application and runs it using go1.8 features to stop it gracefully and allow connections to drain.  When it starts it logs it's hostname and what port it is listening on as well as the go version it was built with and the git commit and build time (if those were provided using ldflags). For example:  `$ go build -ldflags "-X main.buildstamp=`date -u '+%Y-%m-%d_%I:%M:%S%p'` -X main.commit=`git rev-parse HEAD` -w -s"`  Main uses a signal channel to listen for OS signals and will gracefully wait for connections to drain and then stop when it receives a signal to stop, or it will force a shutdown in 5 seconds.  It also has an error channel where it recieves errors from the http server and log them.
Keywords: example-project|go|golang|postgresql