follow golint suggestions

This commit is contained in:
chrislusf
2015-03-10 00:20:31 -07:00
parent b4cb8bfd27
commit b07d81fb08
26 changed files with 570 additions and 101 deletions

View File

@@ -163,7 +163,7 @@ func postFollowingOneRedirect(target string, contentType string, b *bytes.Buffer
if statusCode == http.StatusMovedPermanently {
var urlStr string
if urlStr = resp.Header.Get("Location"); urlStr == "" {
return errors.New(fmt.Sprintf("%d response missing Location header", resp.StatusCode))
return fmt.Errorf("%d response missing Location header", resp.StatusCode)
}
glog.V(0).Infoln("Post redirected to ", urlStr)