From c9130a929336a42cec07aa8c32eda96bd61a07a1 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Wed, 24 Feb 2021 09:14:54 +0000 Subject: [PATCH] Merge variable declaration with assignment --- .../db/dbrepo/supertokenrepo/supertokenrepohelper/helpers.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/db/dbrepo/supertokenrepo/supertokenrepohelper/helpers.go b/internal/db/dbrepo/supertokenrepo/supertokenrepohelper/helpers.go index d14a58cd..dd7c9c04 100644 --- a/internal/db/dbrepo/supertokenrepo/supertokenrepohelper/helpers.go +++ b/internal/db/dbrepo/supertokenrepo/supertokenrepohelper/helpers.go @@ -123,8 +123,7 @@ func RevokeST(tx *sqlx.Tx, id stid.STID, recursive bool) error { // CountRTOccurrences counts how many SuperTokens use the passed refresh token func CountRTOccurrences(tx *sqlx.Tx, rt string) (count int, err error) { - var rtHash string - rtHash = hashUtils.SHA512Str([]byte(rt)) + var rtHash string = hashUtils.SHA512Str([]byte(rt)) err = db.RunWithinTransaction(tx, func(tx *sqlx.Tx) error { err = tx.Get(&count, `SELECT COUNT(1) FROM SuperTokens WHERE rt_hash=?`, rtHash) return err