Fixes from go vet and errcheck

This commit is contained in:
Nick Craig-Wood
2015-09-22 07:31:12 +01:00
parent 05050d53ad
commit 2ed158aba3
7 changed files with 39 additions and 20 deletions
+1 -1
View File
@@ -106,7 +106,7 @@ func sign(AccessKey, SecretKey string, req *http.Request) {
// Make signature
payload := req.Method + "\n" + md5 + "\n" + contentType + "\n" + date + "\n" + joinedHeadersToSign + uri
hash := hmac.New(sha1.New, []byte(SecretKey))
hash.Write([]byte(payload))
_, _ = hash.Write([]byte(payload))
signature := make([]byte, base64.StdEncoding.EncodedLen(hash.Size()))
base64.StdEncoding.Encode(signature, hash.Sum(nil))