From 15c68d7153364d08a380103ef25f6767814c3969 Mon Sep 17 00:00:00 2001 From: Daniel Krol Date: Thu, 2 Jun 2022 14:04:33 -0400 Subject: [PATCH] Move and comment a function --- store/store_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/store/store_test.go b/store/store_test.go index efc264a..580a954 100644 --- a/store/store_test.go +++ b/store/store_test.go @@ -7,6 +7,11 @@ import ( "time" ) +// Utilitiy function that copies a time and then returns a pointer to it +func timePtr(t time.Time) *time.Time { + return &t +} + // Test insertToken, using GetToken as a helper // Try insertToken twice with the same public key, error the second time func TestStoreInsertToken(t *testing.T) { @@ -228,10 +233,6 @@ func TestStoreSaveToken(t *testing.T) { } } -func timePtr(t time.Time) *time.Time { - return &t -} - // test GetToken using insertToken and updateToken as helpers (so we can set expiration timestamps) // normal // not found for pubkey