Skip to content

Commit

Permalink
More fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gaby committed Aug 20, 2023
1 parent 9291b82 commit a638b6d
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 10 deletions.
2 changes: 0 additions & 2 deletions memcache/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ go 1.19

require (
github.com/bradfitz/gomemcache v0.0.0-20221031212613-62deef7fc822
github.com/gofiber/utils/v2 v2.0.0-beta.3
github.com/stretchr/testify v1.8.4
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
4 changes: 0 additions & 4 deletions memcache/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ github.com/bradfitz/gomemcache v0.0.0-20221031212613-62deef7fc822 h1:hjXJeBcAMS1
github.com/bradfitz/gomemcache v0.0.0-20221031212613-62deef7fc822/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/gofiber/utils/v2 v2.0.0-beta.3 h1:pfOhUDDVjBJpkWv6C5jaDyYLvpui7zQ97zpyFFsUOKw=
github.com/gofiber/utils/v2 v2.0.0-beta.3/go.mod h1:jsl17+MsKfwJjM3ONCE9Rzji/j8XNbwjhUVTjzgfDCo=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
Expand Down
3 changes: 1 addition & 2 deletions memcache/memcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"time"

mc "github.com/bradfitz/gomemcache/memcache"
"github.com/gofiber/utils/v2"
)

// Storage interface that is implemented by storage providers
Expand All @@ -21,7 +20,7 @@ func New(config ...Config) *Storage {
cfg := configDefault(config...)

// Split comma separated servers into slice
serverList := strings.Split(utils.Trim(cfg.Servers, ' '), ",")
serverList := strings.Split(strings.Trim(cfg.Servers, ' '), ",")

// Create db
db := mc.New(serverList...)
Expand Down
4 changes: 2 additions & 2 deletions memory/internal/time_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import (
"testing"
"time"

"github.com/gofiber/utils/v2"
"github.com/stretchr/testify/require"
)

func checkTimeStamp(t testing.TB, expectedCurrent, actualCurrent uint32) {
// test with some buffer in front and back of the expectedCurrent time -> because of the timing on the work machine
utils.AssertEqual(t, true, actualCurrent >= expectedCurrent-1 || actualCurrent <= expectedCurrent+1)
require.True(t, actualCurrent >= expectedCurrent-1 || actualCurrent <= expectedCurrent+1)
}

func Test_TimeStampUpdater(t *testing.T) {
Expand Down

0 comments on commit a638b6d

Please sign in to comment.