diff --git a/codec/protobuf/protobuf_test.go b/codec/protobuf/protobuf_test.go index 249e619..236f103 100644 --- a/codec/protobuf/protobuf_test.go +++ b/codec/protobuf/protobuf_test.go @@ -1,7 +1,6 @@ package protobuf import ( - "io/ioutil" "os" "path/filepath" "testing" @@ -19,7 +18,7 @@ func TestProtobuf(t *testing.T) { } func TestSave(t *testing.T) { - dir, _ := ioutil.TempDir(os.TempDir(), "rainstorm") + dir, _ := os.MkdirTemp(os.TempDir(), "rainstorm") defer os.RemoveAll(dir) db, _ := rainstorm.Open(filepath.Join(dir, "rainstorm.db"), rainstorm.Codec(Codec)) u1 := SimpleUser{ID: 1, Name: "John"} @@ -32,7 +31,7 @@ func TestSave(t *testing.T) { } func TestGetSet(t *testing.T) { - dir, _ := ioutil.TempDir(os.TempDir(), "rainstorm") + dir, _ := os.MkdirTemp(os.TempDir(), "rainstorm") defer os.RemoveAll(dir) db, _ := rainstorm.Open(filepath.Join(dir, "rainstorm.db"), rainstorm.Codec(Codec)) err := db.Set("bucket", "key", "value") diff --git a/examples_test.go b/examples_test.go index 4e98217..10ba1fb 100644 --- a/examples_test.go +++ b/examples_test.go @@ -2,7 +2,6 @@ package rainstorm_test import ( "fmt" - "io/ioutil" "log" "os" "path/filepath" @@ -15,7 +14,7 @@ import ( ) func ExampleDB_Save() { - dir, _ := ioutil.TempDir(os.TempDir(), "rainstorm") + dir, _ := os.MkdirTemp(os.TempDir(), "rainstorm") defer os.RemoveAll(dir) type User struct { @@ -195,7 +194,7 @@ func ExampleSkip() { } func ExampleUseDB() { - dir, _ := ioutil.TempDir(os.TempDir(), "rainstorm") + dir, _ := os.MkdirTemp(os.TempDir(), "rainstorm") defer os.RemoveAll(dir) bDB, err := bolt.Open(filepath.Join(dir, "bolt.db"), 0600, &bolt.Options{Timeout: 10 * time.Second}) @@ -516,7 +515,7 @@ type Note struct { } func prepareDB() (string, *rainstorm.DB) { - dir, _ := ioutil.TempDir(os.TempDir(), "rainstorm") + dir, _ := os.MkdirTemp(os.TempDir(), "rainstorm") db, _ := rainstorm.Open(filepath.Join(dir, "rainstorm.db")) for i, name := range []string{"John", "Eric", "Dilbert"} { diff --git a/finder_test.go b/finder_test.go index d7656e0..8deb54b 100644 --- a/finder_test.go +++ b/finder_test.go @@ -2,7 +2,6 @@ package rainstorm import ( "fmt" - "io/ioutil" "os" "path/filepath" "testing" @@ -491,7 +490,7 @@ func TestOne(t *testing.T) { } func TestOneNotWritable(t *testing.T) { - dir, _ := ioutil.TempDir(os.TempDir(), "rainstorm") + dir, _ := os.MkdirTemp(os.TempDir(), "rainstorm") defer os.RemoveAll(dir) db, _ := Open(filepath.Join(dir, "rainstorm.db")) diff --git a/go.mod b/go.mod index 453b439..833d744 100644 --- a/go.mod +++ b/go.mod @@ -3,15 +3,15 @@ module github.com/AndersonBargas/rainstorm/v5 require ( github.com/DataDog/zstd v1.4.1 // indirect github.com/Sereal/Sereal v0.0.0-20200820125258-a016b7cda3f3 - github.com/davecgh/go-spew v1.1.1 // indirect github.com/golang/protobuf v1.3.2 github.com/golang/snappy v0.0.1 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/kr/pretty v0.1.0 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/testify v1.2.2 + github.com/stretchr/testify v1.8.1 github.com/vmihailenco/msgpack v4.0.4+incompatible - go.etcd.io/bbolt v1.3.4 + go.etcd.io/bbolt v1.3.8 golang.org/x/net v0.0.0-20191105084925-a882066a44e0 // indirect + golang.org/x/sys v0.16.0 // indirect google.golang.org/appengine v1.6.5 // indirect gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect ) diff --git a/go.sum b/go.sum index b657197..3012cc5 100644 --- a/go.sum +++ b/go.sum @@ -1,17 +1,17 @@ github.com/DataDog/zstd v1.4.1 h1:3oxKN3wbHibqx897utPC2LTQU4J+IHWWJO+glkAkpFM= github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= -github.com/Sereal/Sereal v0.0.0-20190618215532-0b8ac451a863 h1:BRrxwOZBolJN4gIwvZMJY1tzqBvQgpaZiQRuIDD40jM= -github.com/Sereal/Sereal v0.0.0-20190618215532-0b8ac451a863/go.mod h1:D0JMgToj/WdxCgd30Kc1UcA9E+WdZoJqeVOuYW7iTBM= github.com/Sereal/Sereal v0.0.0-20200820125258-a016b7cda3f3 h1:XgiXcABXIRyuLNyKHIk6gICrVXcGooDUxR+XMRr2QDM= github.com/Sereal/Sereal v0.0.0-20200820125258-a016b7cda3f3/go.mod h1:D0JMgToj/WdxCgd30Kc1UcA9E+WdZoJqeVOuYW7iTBM= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -19,24 +19,34 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 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.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= -go.etcd.io/bbolt v1.3.4 h1:hi1bXHMVrlQh6WwxAy+qZCV/SYIlqo+Ushwdpa4tAKg= -go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= +go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/gofail v0.1.0/go.mod h1:VZBCXYGZhHAinaBiiqYvuDynvahNsAyLFwB3kEHKz1M= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65 h1:+rhAzEzT3f4JtomfC371qB+0Ola2caSKcY69NUBZrRQ= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20191105084925-a882066a44e0 h1:QPlSTtPE2k6PZPasQUbzuK3p9JbS+vMXYVto8g/yrsg= golang.org/x/net v0.0.0-20191105084925-a882066a44e0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5 h1:LfCXLvNmTYH9kEmVgqbnsWfruoXZIrh4YBgqVHtDvw0= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/index/id_test.go b/index/id_test.go index a8ca70c..3ca99fc 100644 --- a/index/id_test.go +++ b/index/id_test.go @@ -1,7 +1,6 @@ package index_test import ( - "io/ioutil" "os" "path/filepath" "testing" @@ -26,7 +25,7 @@ type SimpleProduct struct { } func TestIDIndex(t *testing.T) { - dir, _ := ioutil.TempDir(os.TempDir(), "rainstorm") + dir, _ := os.MkdirTemp(os.TempDir(), "rainstorm") defer os.RemoveAll(dir) db, _ := rainstorm.Open(filepath.Join(dir, "rainstorm.db")) defer db.Close() @@ -62,7 +61,7 @@ func TestIDIndex(t *testing.T) { } func TestIDIndexPrefix(t *testing.T) { - dir, _ := ioutil.TempDir(os.TempDir(), "rainstorm") + dir, _ := os.MkdirTemp(os.TempDir(), "rainstorm") defer os.RemoveAll(dir) db, _ := rainstorm.Open(filepath.Join(dir, "rainstorm.db")) defer db.Close() @@ -112,7 +111,7 @@ func TestIDIndexPrefix(t *testing.T) { } func TestIDIndexRange(t *testing.T) { - dir, _ := ioutil.TempDir(os.TempDir(), "rainstorm") + dir, _ := os.MkdirTemp(os.TempDir(), "rainstorm") defer os.RemoveAll(dir) db, _ := rainstorm.Open(filepath.Join(dir, "rainstorm.db")) defer db.Close() @@ -159,7 +158,7 @@ func TestIDIndexRange(t *testing.T) { } func TestIDIndexParams(t *testing.T) { - dir, _ := ioutil.TempDir(os.TempDir(), "rainstorm") + dir, _ := os.MkdirTemp(os.TempDir(), "rainstorm") defer os.RemoveAll(dir) db, _ := rainstorm.Open(filepath.Join(dir, "rainstorm.db")) defer db.Close() @@ -198,7 +197,7 @@ func TestIDIndexParams(t *testing.T) { } /*func TestIDIndex(t *testing.T) { - dir, _ := ioutil.TempDir(os.TempDir(), "rainstorm") + dir, _ := os.MkdirTemp(os.TempDir(), "rainstorm") defer os.RemoveAll(dir) db, _ := rainstorm.Open(filepath.Join(dir, "rainstorm.db")) defer db.Close() @@ -303,7 +302,7 @@ func TestIDIndexParams(t *testing.T) { } func TestIDIndexRange(t *testing.T) { - dir, _ := ioutil.TempDir(os.TempDir(), "rainstorm") + dir, _ := os.MkdirTemp(os.TempDir(), "rainstorm") defer os.RemoveAll(dir) db, _ := rainstorm.Open(filepath.Join(dir, "rainstorm.db")) defer db.Close() @@ -375,7 +374,7 @@ func TestIDIndexRange(t *testing.T) { } func TestIDIndexPrefix(t *testing.T) { - dir, _ := ioutil.TempDir(os.TempDir(), "rainstorm") + dir, _ := os.MkdirTemp(os.TempDir(), "rainstorm") defer os.RemoveAll(dir) db, _ := rainstorm.Open(filepath.Join(dir, "rainstorm.db")) defer db.Close() diff --git a/index/list_test.go b/index/list_test.go index 260bd1f..76b85c7 100644 --- a/index/list_test.go +++ b/index/list_test.go @@ -3,7 +3,6 @@ package index_test import ( "bytes" "fmt" - "io/ioutil" "os" "path/filepath" "testing" @@ -16,7 +15,7 @@ import ( ) func TestListIndex(t *testing.T) { - dir, _ := ioutil.TempDir(os.TempDir(), "rainstorm") + dir, _ := os.MkdirTemp(os.TempDir(), "rainstorm") defer os.RemoveAll(dir) db, _ := rainstorm.Open(filepath.Join(dir, "rainstorm.db")) defer db.Close() @@ -165,7 +164,7 @@ func TestListIndex(t *testing.T) { } func TestListIndexReverse(t *testing.T) { - dir, _ := ioutil.TempDir(os.TempDir(), "rainstorm") + dir, _ := os.MkdirTemp(os.TempDir(), "rainstorm") defer os.RemoveAll(dir) db, _ := rainstorm.Open(filepath.Join(dir, "rainstorm.db")) defer db.Close() @@ -210,7 +209,7 @@ func TestListIndexReverse(t *testing.T) { } func TestListIndexAddRemoveID(t *testing.T) { - dir, _ := ioutil.TempDir(os.TempDir(), "rainstorm") + dir, _ := os.MkdirTemp(os.TempDir(), "rainstorm") defer os.RemoveAll(dir) db, _ := rainstorm.Open(filepath.Join(dir, "rainstorm.db")) defer db.Close() @@ -254,7 +253,7 @@ func TestListIndexAddRemoveID(t *testing.T) { } func TestListIndexAllRecords(t *testing.T) { - dir, _ := ioutil.TempDir(os.TempDir(), "rainstorm") + dir, _ := os.MkdirTemp(os.TempDir(), "rainstorm") defer os.RemoveAll(dir) db, _ := rainstorm.Open(filepath.Join(dir, "rainstorm.db")) defer db.Close() @@ -333,7 +332,7 @@ func TestListIndexAllRecords(t *testing.T) { } func TestListIndexRange(t *testing.T) { - dir, _ := ioutil.TempDir(os.TempDir(), "rainstorm") + dir, _ := os.MkdirTemp(os.TempDir(), "rainstorm") defer os.RemoveAll(dir) db, _ := rainstorm.Open(filepath.Join(dir, "rainstorm.db")) defer db.Close() @@ -429,7 +428,7 @@ func TestListIndexRange(t *testing.T) { } func TestListIndexPrefix(t *testing.T) { - dir, _ := ioutil.TempDir(os.TempDir(), "rainstorm") + dir, _ := os.MkdirTemp(os.TempDir(), "rainstorm") defer os.RemoveAll(dir) db, _ := rainstorm.Open(filepath.Join(dir, "rainstorm.db")) defer db.Close() diff --git a/index/unique_test.go b/index/unique_test.go index a824932..f725863 100644 --- a/index/unique_test.go +++ b/index/unique_test.go @@ -2,7 +2,6 @@ package index_test import ( "fmt" - "io/ioutil" "os" "path/filepath" "testing" @@ -15,7 +14,7 @@ import ( ) func TestUniqueIndex(t *testing.T) { - dir, _ := ioutil.TempDir(os.TempDir(), "rainstorm") + dir, _ := os.MkdirTemp(os.TempDir(), "rainstorm") defer os.RemoveAll(dir) db, _ := rainstorm.Open(filepath.Join(dir, "rainstorm.db")) defer db.Close() @@ -120,7 +119,7 @@ func TestUniqueIndex(t *testing.T) { } func TestUniqueIndexRange(t *testing.T) { - dir, _ := ioutil.TempDir(os.TempDir(), "rainstorm") + dir, _ := os.MkdirTemp(os.TempDir(), "rainstorm") defer os.RemoveAll(dir) db, _ := rainstorm.Open(filepath.Join(dir, "rainstorm.db")) defer db.Close() @@ -192,7 +191,7 @@ func TestUniqueIndexRange(t *testing.T) { } func TestUniqueIndexPrefix(t *testing.T) { - dir, _ := ioutil.TempDir(os.TempDir(), "rainstorm") + dir, _ := os.MkdirTemp(os.TempDir(), "rainstorm") defer os.RemoveAll(dir) db, _ := rainstorm.Open(filepath.Join(dir, "rainstorm.db")) defer db.Close() diff --git a/q/examples_test.go b/q/examples_test.go index b21a334..9b8f6f9 100644 --- a/q/examples_test.go +++ b/q/examples_test.go @@ -8,7 +8,6 @@ import ( "os" - "io/ioutil" "path/filepath" "strings" @@ -46,7 +45,7 @@ type User struct { } func prepareDB() (string, *rainstorm.DB) { - dir, _ := ioutil.TempDir(os.TempDir(), "rainstorm") + dir, _ := os.MkdirTemp(os.TempDir(), "rainstorm") db, _ := rainstorm.Open(filepath.Join(dir, "rainstorm.db")) for i, name := range []string{"John", "Norm", "Donald", "Eric", "Dilbert"} { diff --git a/storm_test.go b/storm_test.go index cae8978..9e97f5f 100644 --- a/storm_test.go +++ b/storm_test.go @@ -3,7 +3,6 @@ package rainstorm import ( "bytes" "encoding/binary" - "io/ioutil" "math" "math/bits" "os" @@ -26,7 +25,7 @@ func TestNewStorm(t *testing.T) { require.Error(t, err) require.Nil(t, db) - dir, err := ioutil.TempDir(os.TempDir(), "rainstorm") + dir, err := os.MkdirTemp(os.TempDir(), "rainstorm") require.NoError(t, err) defer os.RemoveAll(dir) @@ -47,7 +46,7 @@ func TestNewStorm(t *testing.T) { } func TestNewRainstormWithRainstormOptions(t *testing.T) { - dir, _ := ioutil.TempDir(os.TempDir(), "rainstorm") + dir, _ := os.MkdirTemp(os.TempDir(), "rainstorm") defer os.RemoveAll(dir) dc := new(dummyCodec) @@ -63,7 +62,7 @@ func TestNewRainstormWithRainstormOptions(t *testing.T) { } func TestNewRainstormWithBatch(t *testing.T) { - dir, _ := ioutil.TempDir(os.TempDir(), "rainstorm") + dir, _ := os.MkdirTemp(os.TempDir(), "rainstorm") defer os.RemoveAll(dir) db1, _ := Open(filepath.Join(dir, "rainstorm1.db"), Batch()) @@ -83,7 +82,7 @@ func TestNewRainstormWithBatch(t *testing.T) { } func TestBoltDB(t *testing.T) { - dir, _ := ioutil.TempDir(os.TempDir(), "rainstorm") + dir, _ := os.MkdirTemp(os.TempDir(), "rainstorm") defer os.RemoveAll(dir) bDB, err := bolt.Open(filepath.Join(dir, "bolt.db"), 0600, &bolt.Options{Timeout: 10 * time.Second}) require.NoError(t, err) @@ -163,7 +162,7 @@ func TestToBytes(t *testing.T) { } func createDB(t errorHandler, opts ...func(*Options) error) (*DB, func()) { - dir, err := ioutil.TempDir(os.TempDir(), "rainstorm") + dir, err := os.MkdirTemp(os.TempDir(), "rainstorm") if err != nil { t.Error(err) } diff --git a/version.go b/version.go index 2197416..e5a61d5 100644 --- a/version.go +++ b/version.go @@ -1,4 +1,4 @@ package rainstorm // Version of Rainstorm -const Version = "5.0.0" +const Version = "5.1.0"