heroku/force — pull request #17 by kvarga (2013-11-07 17:07:54+00:00)
Title: move defer calls to after error check to avoid panic

I was getting a panic if my internet connection dropped or made a bad request to Salesforce. After doing some research ( http://stackoverflow.com/questions/16280176/go-panic-runtime-error-invalid-memory-address-or-nil-pointer-dereference ) I detected it was the defer call being made to Close() the HTTP Connection even if a connection didn't exist. This PR fixes this issue.