Skip to content

Commit

Permalink
go 1.20 (#314)
Browse files Browse the repository at this point in the history
* fix test to deal with go1.20 (it now always seeds the rng)
* update lua dependency
  • Loading branch information
alicebob committed Feb 22, 2023
1 parent 83e0549 commit 5cd31f7
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.14', '1.17', '1.18', '1.19' ]
go: [ '1.14', '1.18', '1.19', '1.20' ]
name: Go ${{ matrix.go }}
steps:
- uses: actions/checkout@v3
Expand Down
3 changes: 2 additions & 1 deletion cmd_set_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,11 @@ func TestSpop(t *testing.T) {
})

t.Run("count argument", func(t *testing.T) {
s.Seed(42)
s.SetAdd("s", "aap", "noot", "mies", "vuur")
mustDo(t, c,
"SPOP", "s", "2",
proto.Strings("aap", "noot"),
proto.Strings("mies", "vuur"),
)
members, err := s.Members("s")
ok(t, err)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/alicebob/miniredis/v2

require (
github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a
github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64
github.com/yuin/gopher-lua v1.1.0
)

go 1.14
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ github.com/yuin/gopher-lua v0.0.0-20210529063254-f4c35e4016d9 h1:k/gmLsJDWwWqbLC
github.com/yuin/gopher-lua v0.0.0-20210529063254-f4c35e4016d9/go.mod h1:E1AXubJBdNmFERAOucpDIxNzeGfLzg0mYh+UfMWdChA=
github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64 h1:5mLPGnFdSsevFRFc9q3yYbBkB6tsm4aCwwQV/j1JQAQ=
github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw=
github.com/yuin/gopher-lua v1.1.0 h1:BojcDhfyDWgU2f2TOzYK/g5p2gxMrku8oupLDqlnSqE=
github.com/yuin/gopher-lua v1.1.0/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw=
golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
1 change: 1 addition & 0 deletions integration/hll_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ func TestHll(t *testing.T) {
const letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"

func randomStr(length int) string {
rand.Seed(42)
b := make([]byte, length)
for i := range b {
b[i] = letters[rand.Intn(len(letters))]
Expand Down

0 comments on commit 5cd31f7

Please sign in to comment.