From 00989d9a4dc8760cf9786ce39295a1a27e2a563f Mon Sep 17 00:00:00 2001 From: mrz1836 Date: Sun, 3 Apr 2022 15:18:32 -0400 Subject: [PATCH] Fixed linter issues --- paymail.go | 10 ++++------ tester/embedded_test.go | 10 ++++++++++ tester/tester_test.go | 11 ++--------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/paymail.go b/paymail.go index e17b91c8..0a135d26 100644 --- a/paymail.go +++ b/paymail.go @@ -105,12 +105,10 @@ func resolvePaymailAddress(ctx context.Context, cs cachestore.ClientInterface, c // Save to cachestore if cs != nil && !cs.Engine().IsEmpty() { - go func() { - _ = cs.SetModel( - ctx, cacheKeyAddressResolution+alias+"-"+domain, - &response.ResolutionPayload, cacheTTLAddressResolution, - ) - }() + _ = cs.SetModel( + ctx, cacheKeyAddressResolution+alias+"-"+domain, + &response.ResolutionPayload, cacheTTLAddressResolution, + ) } return &response.ResolutionPayload, nil diff --git a/tester/embedded_test.go b/tester/embedded_test.go index 7b4dbc4b..85237290 100644 --- a/tester/embedded_test.go +++ b/tester/embedded_test.go @@ -10,6 +10,16 @@ import ( "github.com/stretchr/testify/require" ) +const ( + // testDatabasePort1 = 23902 + testDatabaseHost = "localhost" + testDatabaseName = "test" + testDatabasePassword = "tester-pw" + testDatabasePort2 = 23903 + testDatabaseUser = "tester" + testMongoVersion = "4.2.1" +) + // TestCreateMongoServer will test the method CreateMongoServer() func TestCreateMongoServer(t *testing.T) { t.Parallel() diff --git a/tester/tester_test.go b/tester/tester_test.go index f474da98..278f1236 100644 --- a/tester/tester_test.go +++ b/tester/tester_test.go @@ -7,15 +7,8 @@ import ( ) const ( - testDatabasePort1 = 23902 - testDatabaseHost = "localhost" - testDatabaseName = "test" - testDatabasePassword = "tester-pw" - testDatabasePort2 = 23903 - testDatabaseUser = "tester" - testDomain = "domain.com" - testMongoVersion = "4.2.1" - testRedisConnection = "redis://localhost:6379" + testDomain = "domain.com" + testRedisConnection = "redis://localhost:6379" ) // TestRandomTablePrefix will test the method RandomTablePrefix()