This PR Adds a type uint64 to the accessTokenCookiesExpiryDurationMillis local variable in recipe/session/utils.go. It also removes the redundant uint64 type forcing needed because of the untyped variable.
Reason:
While using GoReleaser to generate a release of my project using the supertokens-golang SDK it flagged an error building the binary for linux_386 | Linux i386.
The error:
⨯ release failed after 52s error=failed to build for linux_386: exit status 1: # github.com/supertokens/supertokens-golang/recipe/session
/root/go/pkg/mod/github.com/supertokens/supertokens-golang@v0.17.4/recipe/session/utils.go:242:46: cannot use 3153600000000 (untyped int constant) as int value in variable declaration (overflows)
Related issues
398 GoReleaser Fails on account of an untyped variable declaration
Test Plan
There were no dedicated test cases in the utils_test.go file. However the locally affected variable can be tested to make sure of type and overflow but running it against it's local case: GetCurrTimeInMS() + accessTokenCookiesExpiryDurationMillis. I will provide a screenshot of the output in the GoBetterPlayground and a link below.
[ ] coreDriverInterfaceSupported.json file has been updated (if needed)
Along with the associated array in supertokens/constants.go
[ ] frontendDriverInterfaceSupported.json file has been updated (if needed)
[ ] Changes to the version if needed
In supertokens/constants.go > version variable
[ ] Had installed and ran the pre-commit hook
[ ] If new thirdparty provider is added,
[ ] update switch statement in recipe/thirdparty/providers/config_utils.go file, createProvider function.
[ ] add an icon on the user management dashboard.
[ ] Issue this PR against the latest non released version branch.
To know which one it is, run find the latest released tag (git tag) in the format vX.Y.Z, and then find the latest branch (git branch --all) whose X.Y is greater than the latest released tag.
If no such branch exists, then create one from the latest released branch.
[ ] If access token structure has changed
Modified test in session/accessTokenVersions_test.go to account for any new claims that are optional or omitted by the core
Remaining TODOs for this PR
[ ] Create actual tests in the utils_test.go folder if required.
Summary of change
SuperTokens-golang Version 0.17.4
This PR Adds a type
uint64
to theaccessTokenCookiesExpiryDurationMillis
local variable inrecipe/session/utils.go
. It also removes the redundantuint64
type forcing needed because of the untyped variable.Reason:
While using GoReleaser to generate a release of my project using the supertokens-golang SDK it flagged an error building the binary for
linux_386
|Linux i386
.The error:
Related issues
398 GoReleaser Fails on account of an untyped variable declaration
Test Plan
There were no dedicated test cases in the
utils_test.go
file. However the locally affected variable can be tested to make sure of type and overflow but running it against it's local case:GetCurrTimeInMS() + accessTokenCookiesExpiryDurationMillis
. I will provide a screenshot of the output in the GoBetterPlayground and a link below.Go Better Playground Test
Documentation changes
Not-relevant for documentation changes.
Checklist for important updates
coreDriverInterfaceSupported.json
file has been updated (if needed)supertokens/constants.go
frontendDriverInterfaceSupported.json
file has been updated (if needed)supertokens/constants.go > version variable
recipe/thirdparty/providers/config_utils.go
file,createProvider
function.git tag
) in the formatvX.Y.Z
, and then find the latest branch (git branch --all
) whoseX.Y
is greater than the latest released tag.session/accessTokenVersions_test.go
to account for any new claims that are optional or omitted by the coreRemaining TODOs for this PR
utils_test.go
folder if required.