Skip to content

Commit

Permalink
update go to 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
tjungblu committed Feb 1, 2024
1 parent 98fdf0a commit 0ff9aa7
Show file tree
Hide file tree
Showing 28 changed files with 89 additions and 114 deletions.
3 changes: 1 addition & 2 deletions benchmark/recordio_write_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package benchmark
import (
"github.com/stretchr/testify/assert"
"github.com/thomasjungblut/go-sstables/recordio"
"io/ioutil"
"math/rand"
"os"
"testing"
Expand Down Expand Up @@ -40,7 +39,7 @@ func BenchmarkRecordIOWrite(b *testing.B) {
for _, bm := range benchmarks {
b.Run(bm.name, func(b *testing.B) {
bytes := randomRecordOfSize(bm.recSize)
tmpFile, err := ioutil.TempFile("", "recordio_Bench")
tmpFile, err := os.CreateTemp("", "recordio_Bench")
assert.Nil(b, err)
defer os.Remove(tmpFile.Name())

Expand Down
5 changes: 2 additions & 3 deletions benchmark/simpledb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package benchmark
import (
"fmt"
"io"
"io/ioutil"
"log"
"math/rand"
"os"
Expand All @@ -25,7 +24,7 @@ func BenchmarkSimpleDBReadLatency(b *testing.B) {

for _, n := range dbSizes {
b.Run(fmt.Sprintf("%d", n), func(b *testing.B) {
tmpDir, err := ioutil.TempDir("", "simpledb_Bench")
tmpDir, err := os.MkdirTemp("", "simpledb_Bench")
require.Nil(b, err)
defer func() { require.Nil(b, os.RemoveAll(tmpDir)) }()
db, err := simpledb.NewSimpleDB(tmpDir,
Expand Down Expand Up @@ -59,7 +58,7 @@ func BenchmarkSimpleDBWriteLatency(b *testing.B) {

for _, n := range dbSizes {
b.Run(fmt.Sprintf("%d", n), func(b *testing.B) {
tmpDir, err := ioutil.TempDir("", "simpledb_Bench")
tmpDir, err := os.MkdirTemp("", "simpledb_Bench")
require.Nil(b, err)
defer func() { require.Nil(b, os.RemoveAll(tmpDir)) }()

Expand Down
3 changes: 1 addition & 2 deletions benchmark/sstable_read_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ import (
"github.com/stretchr/testify/assert"
"github.com/thomasjungblut/go-sstables/skiplist"
"github.com/thomasjungblut/go-sstables/sstables"
"io/ioutil"
"os"
"testing"
)

// we're writing a gig worth of data and test how long it takes to read the index + all data
func BenchmarkSSTableRead(b *testing.B) {
tmpDir, err := ioutil.TempDir("", "sstable_BenchRead")
tmpDir, err := os.MkdirTemp("", "sstable_BenchRead")
assert.Nil(b, err)
defer func() { assert.Nil(b, os.RemoveAll(tmpDir)) }()

Expand Down
3 changes: 1 addition & 2 deletions benchmark/sstable_write_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/thomasjungblut/go-sstables/memstore"
"github.com/thomasjungblut/go-sstables/skiplist"
"github.com/thomasjungblut/go-sstables/sstables"
"io/ioutil"
"os"
"testing"
)
Expand Down Expand Up @@ -41,7 +40,7 @@ func BenchmarkSSTableMemstoreFlush(b *testing.B) {

var tmpDirs []string
for n := 0; n < b.N; n++ {
tmpDir, err := ioutil.TempDir("", "sstable_BenchWrite")
tmpDir, err := os.MkdirTemp("", "sstable_BenchWrite")
assert.Nil(b, err)
tmpDirs = append(tmpDirs, tmpDir)
}
Expand Down
15 changes: 7 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,22 @@ module github.com/thomasjungblut/go-sstables

require (
github.com/anishathalye/porcupine v0.1.2
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db
github.com/libp2p/go-buffer-pool v0.0.2
github.com/golang/snappy v0.0.4
github.com/libp2p/go-buffer-pool v0.1.0
github.com/ncw/directio v1.0.5
github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570
github.com/stretchr/testify v1.7.0
golang.org/x/exp v0.0.0-20181210123644-7d6377eee41f
google.golang.org/protobuf v1.26.0
github.com/stretchr/testify v1.8.4
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a
google.golang.org/protobuf v1.32.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
gopkg.in/yaml.v3 v3.0.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/anishathalye/porcupine v0.1.2 => github.com/tjungblu/porcupine v0.0.0-20221116095144-377185aa0569

go 1.19
go 1.21
36 changes: 14 additions & 22 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
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.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs=
github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM=
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8=
github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg=
github.com/ncw/directio v1.0.5 h1:JSUBhdjEvVaJvOoyPAbcW0fnd0tvRXD76wEfZ1KcQz4=
github.com/ncw/directio v1.0.5/go.mod h1:rX/pKEYkOXBGOggmcyJeJGloCkleSvphPx2eV3t6ROk=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand All @@ -16,21 +14,15 @@ github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570 h1:gIlAHnH1
github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw=
github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3 h1:njlZPzLwU639dk2kqnCPPv+wNjq7Xb6EfUxe/oX0/NM=
github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tjungblu/porcupine v0.0.0-20221116095144-377185aa0569 h1:acDBvgSBtnyBidmpmTEgxStjXeuYyfG3fF72khP24/Y=
github.com/tjungblu/porcupine v0.0.0-20221116095144-377185aa0569/go.mod h1:+z336r1WR0gcwl1ALfoNBpDTCW06vO5DzBwunEcSvcs=
golang.org/x/exp v0.0.0-20181210123644-7d6377eee41f h1:wJ3O7VtAmBlW5LFzggOI2U6CBWIkG+/IYf4Q/VGJdaA=
golang.org/x/exp v0.0.0-20181210123644-7d6377eee41f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a h1:Q8/wZp0KX97QFTc2ywcOE0YRjZPVIx+MXInMzdvQqcA=
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08=
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/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.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA=
gopkg.in/yaml.v3 v3.0.0/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=
7 changes: 3 additions & 4 deletions memstore/memstore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"errors"
"github.com/stretchr/testify/assert"
"github.com/thomasjungblut/go-sstables/sstables"
"io/ioutil"
"os"
"testing"
)
Expand Down Expand Up @@ -165,7 +164,7 @@ func TestMemStoreFlush(t *testing.T) {
err = m.Upsert([]byte("bkey"), []byte("bval"))
assert.Nil(t, err)

tmpDir, err := ioutil.TempDir("", "memstore_flush")
tmpDir, err := os.MkdirTemp("", "memstore_flush")
assert.Nil(t, err)
defer func() { assert.Nil(t, os.RemoveAll(tmpDir)) }()

Expand Down Expand Up @@ -199,7 +198,7 @@ func TestMemStoreFlushTombStonesIgnore(t *testing.T) {
assert.Nil(t, err)
assert.Nil(t, m.Delete([]byte("akey")))

tmpDir, err := ioutil.TempDir("", "memstore_flush")
tmpDir, err := os.MkdirTemp("", "memstore_flush")
assert.Nil(t, err)
defer func() { assert.Nil(t, os.RemoveAll(tmpDir)) }()

Expand Down Expand Up @@ -232,7 +231,7 @@ func TestMemStoreFlushWithTombStonesInclusive(t *testing.T) {
assert.Nil(t, err)
assert.Nil(t, m.Delete([]byte("akey")))

tmpDir, err := ioutil.TempDir("", "memstore_flush")
tmpDir, err := os.MkdirTemp("", "memstore_flush")
assert.Nil(t, err)
defer func() { assert.Nil(t, os.RemoveAll(tmpDir)) }()

Expand Down
6 changes: 3 additions & 3 deletions recordio/buffered_io_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package recordio
import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"io/ioutil"
"os"
"testing"
)

func TestBufferedIOFactory_CreateNewReader(t *testing.T) {
temp, err := ioutil.TempFile("", "TestBufferedIOFactory_CreateNewReader")
temp, err := os.CreateTemp("", "TestBufferedIOFactory_CreateNewReader")
require.NoError(t, err)
require.NoError(t, temp.Close())

Expand All @@ -21,7 +21,7 @@ func TestBufferedIOFactory_CreateNewReader(t *testing.T) {
}

func TestBufferedIOFactory_CreateNewWriter(t *testing.T) {
temp, err := ioutil.TempFile("", "TestBufferedIOFactory_CreateNewWriter")
temp, err := os.CreateTemp("", "TestBufferedIOFactory_CreateNewWriter")
require.NoError(t, err)
require.NoError(t, temp.Close())

Expand Down
3 changes: 1 addition & 2 deletions recordio/direct_io.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package recordio

import (
"errors"
"io/ioutil"
"os"
"syscall"

Expand Down Expand Up @@ -37,7 +36,7 @@ func (d DirectIOFactory) CreateNewWriter(filePath string, bufSize int) (*os.File
// Any other error will be indicated by the error (either true/false).
func IsDirectIOAvailable() (available bool, err error) {
// the only way to check is to create a tmp file and check whether the error is EINVAL, which indicates it's not available.
tmpFile, err := ioutil.TempFile("", "directio-test")
tmpFile, err := os.CreateTemp("", "directio-test")
if err != nil {
return
}
Expand Down
6 changes: 3 additions & 3 deletions recordio/direct_io_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package recordio
import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"io/ioutil"
"os"
"testing"
)

Expand All @@ -15,7 +15,7 @@ func TestDirectIOFactory_CreateNewReader(t *testing.T) {
return
}

temp, err := ioutil.TempFile("", "TestDirectIOFactory_CreateNewReader")
temp, err := os.CreateTemp("", "TestDirectIOFactory_CreateNewReader")
require.NoError(t, err)
require.NoError(t, temp.Close())

Expand All @@ -35,7 +35,7 @@ func TestDirectIOFactory_CreateNewWriter(t *testing.T) {
return
}

temp, err := ioutil.TempFile("", "TestDirectIOFactory_CreateNewWriter")
temp, err := os.CreateTemp("", "TestDirectIOFactory_CreateNewWriter")
require.NoError(t, err)
require.NoError(t, temp.Close())

Expand Down
3 changes: 1 addition & 2 deletions recordio/file_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"os"

pool "github.com/libp2p/go-buffer-pool"
Expand Down Expand Up @@ -68,7 +67,7 @@ func (r *FileReader) ReadNext() ([]byte, error) {
// due to the use of blocked writes in DirectIO, we need to test whether the remainder of the file contains only zeros.
// This would indicate a properly written file and the actual end - and not a malformed record.
if errors.Is(err, MagicNumberMismatchErr) {
remainder, err := ioutil.ReadAll(r.reader)
remainder, err := io.ReadAll(r.reader)
if err != nil {
return nil, fmt.Errorf("error while parsing record header seeking for file end of '%s': %w", r.file.Name(), err)
}
Expand Down
17 changes: 8 additions & 9 deletions recordio/file_reader_generator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"encoding/binary"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"io/ioutil"
"os"
"testing"
)
Expand Down Expand Up @@ -46,31 +45,31 @@ func writeDirectIOUncompressedSingleRecord(t *testing.T, path string) {

func writeDirectIOUncompressedSingleRecordRandomTrailer(t *testing.T, path string) {
writeDirectIOUncompressedSingleRecord(t, path)
bytes, err := ioutil.ReadFile(path)
bytes, err := os.ReadFile(path)
require.NoError(t, err)
// write some garbled data in between, so we know this file might be corrupted instead of properly written by directIO
binary.PutUvarint(bytes[1024:1028], 1337)
err = ioutil.WriteFile(path, bytes, 0666)
err = os.WriteFile(path, bytes, 0666)
require.NoError(t, err)
}

func writeUncompressedSingleRecordAugmentedMagicNumber(t *testing.T, path string) {
writeUncompressedSingleRecord(t, path)
bytes, err := ioutil.ReadFile(path)
bytes, err := os.ReadFile(path)
binary.PutUvarint(bytes[8:12], MagicNumberSeparatorLong+1)
assert.Nil(t, err)
err = ioutil.WriteFile(path, bytes, 0666)
err = os.WriteFile(path, bytes, 0666)
assert.Nil(t, err)
}

func writeCompressedSingleRecordAugmented(t *testing.T, path string, compType int) {
writeCompressedSingleRecord(t, path, CompressionTypeGZIP)
bytes, err := ioutil.ReadFile(path)
bytes, err := os.ReadFile(path)

binary.LittleEndian.PutUint32(bytes[4:8], uint32(compType))

assert.Nil(t, err)
err = ioutil.WriteFile(path, bytes, 0666)
err = os.WriteFile(path, bytes, 0666)
assert.Nil(t, err)
}

Expand All @@ -88,12 +87,12 @@ func writeVersionMismatchAugmented(t *testing.T, path string, augmentedVersion u
writer, err := newUncompressedOpenedWriterAtPath(path)
assert.Nil(t, err)
assert.Nil(t, writer.Close())
bytes, err := ioutil.ReadFile(path)
bytes, err := os.ReadFile(path)

binary.LittleEndian.PutUint32(bytes[0:4], augmentedVersion)

assert.Nil(t, err)
err = ioutil.WriteFile(path, bytes, 0666)
err = os.WriteFile(path, bytes, 0666)
assert.Nil(t, err)
}

Expand Down
13 changes: 6 additions & 7 deletions recordio/file_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package recordio
import (
"errors"
"io"
"io/ioutil"
"math/rand"
"os"
"testing"
Expand Down Expand Up @@ -145,7 +144,7 @@ func TestWriterOpenNonEmptyFile(t *testing.T) {
}

func TestWriterDoublePathFileInit(t *testing.T) {
tmpFile, err := ioutil.TempFile("", "recordio_UncompressedWriter")
tmpFile, err := os.CreateTemp("", "recordio_UncompressedWriter")
require.Nil(t, err)
defer closeCleanFile(t, tmpFile)

Expand All @@ -159,7 +158,7 @@ func TestWriterInitNoPath(t *testing.T) {
}

func TestWriterCrashCreatesValidHeader(t *testing.T) {
tmpFile, err := ioutil.TempFile("", "recordio_CrashCreatesValidHeader")
tmpFile, err := os.CreateTemp("", "recordio_CrashCreatesValidHeader")
require.Nil(t, err)
defer closeCleanFile(t, tmpFile)

Expand All @@ -185,7 +184,7 @@ func TestWriterCrashCreatesNoValidHeaderWithDirectIO(t *testing.T) {
return
}

tmpFile, err := ioutil.TempFile("", "recordio_CrashCreatesValidHeaderDirectIO")
tmpFile, err := os.CreateTemp("", "recordio_CrashCreatesValidHeaderDirectIO")
require.Nil(t, err)
defer closeCleanFile(t, tmpFile)

Expand All @@ -209,7 +208,7 @@ func TestWriterNotAllowsSyncsWithDirectIO(t *testing.T) {
return
}

tmpFile, err := ioutil.TempFile("", "recordio_WriterNotAllowsSyncsWithDirectIO")
tmpFile, err := os.CreateTemp("", "recordio_WriterNotAllowsSyncsWithDirectIO")
require.Nil(t, err)
defer closeCleanFile(t, tmpFile)

Expand All @@ -223,7 +222,7 @@ func TestWriterNotAllowsSyncsWithDirectIO(t *testing.T) {
}

func newUncompressedTestWriter() (*FileWriter, error) {
tmpFile, err := ioutil.TempFile("", "recordio_UncompressedWriter")
tmpFile, err := os.CreateTemp("", "recordio_UncompressedWriter")
if err != nil {
return nil, err
}
Expand All @@ -238,7 +237,7 @@ func newUncompressedTestWriter() (*FileWriter, error) {
}

func newCompressedTestWriter(compType int) (*FileWriter, error) {
tmpFile, err := ioutil.TempFile("", "recordio_CompressedWriter")
tmpFile, err := os.CreateTemp("", "recordio_CompressedWriter")
if err != nil {
return nil, err
}
Expand Down
Loading

0 comments on commit 0ff9aa7

Please sign in to comment.