Skip to content

Commit

Permalink
discard error on hash.Write
Browse files Browse the repository at this point in the history
  • Loading branch information
cenkalti committed Mar 19, 2019
1 parent c0a4e9a commit 58d8be0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/handler/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,6 @@ func TestPostUsers(t *testing.T) {

func generateUserHash(userID, secret string) string {
hash := hmac.New(sha256.New, []byte(secret))
hash.Write([]byte(userID))
_, _ = hash.Write([]byte(userID))
return hex.EncodeToString(hash.Sum(nil))
}

0 comments on commit 58d8be0

Please sign in to comment.