From 1a14ab3c59ea7441ad3f40bb4b9e76cd5224d474 Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Thu, 2 Jan 2025 09:39:38 -0800 Subject: [PATCH 1/2] Use slices --- mmdbtype/types.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mmdbtype/types.go b/mmdbtype/types.go index ac8fe1c..87c1fbd 100644 --- a/mmdbtype/types.go +++ b/mmdbtype/types.go @@ -9,9 +9,7 @@ import ( "math/big" "math/bits" "reflect" - - // TODO: Once the min Go version is 1.21, switch this to "slices". - "golang.org/x/exp/slices" + "slices" ) type typeNum byte From e567499ae82d7ad352ff2d70ce9c9a07e5dee2fb Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Thu, 2 Jan 2025 09:39:43 -0800 Subject: [PATCH 2/2] Use t.TempDir --- tree_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tree_test.go b/tree_test.go index d98d1aa..3fdccf5 100644 --- a/tree_test.go +++ b/tree_test.go @@ -691,7 +691,7 @@ func TestTreeInsertAndGet(t *testing.T) { assert.Equal(t, int64(buf.Len()), numBytes, "number of bytes") - f, err := os.CreateTemp("", "mmdbwriter") + f, err := os.CreateTemp(t.TempDir(), "mmdbwriter") require.NoError(t, err) defer func() { require.NoError(t, os.Remove(f.Name())) }()